diff options
author | daurnimator <quae@daurnimator.com> | 2014-06-11 14:59:59 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-06-11 14:59:59 -0400 |
commit | be47daf8e124b7f96a7081d9873a277bf1403858 (patch) | |
tree | 3f17cc93865aed9752581893a4c04f46d3d4eeb6 /plugins/muc/muc.lib.lua | |
parent | 473c08dc107419c8f0df2bb8a8c23a28369a5312 (diff) | |
download | prosody-be47daf8e124b7f96a7081d9873a277bf1403858.tar.gz prosody-be47daf8e124b7f96a7081d9873a277bf1403858.zip |
plugins/muc/muc.lib: Deliver declines to in-room jids correctly
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 57cc3721..85c256a2 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -895,7 +895,11 @@ function room_mt:handle_mediated_decline(origin, stanza) :up() :up(); if not module:fire_event("muc-decline", {room = self, stanza = decline, origin = origin, incoming = stanza}) then - local occupant = self:get_occupant_by_real_jid(decline.attr.to); + local declinee = decline.attr.to; -- re-fetch, in case event modified it + local occupant + if jid_bare(declinee) == self.jid then -- declinee jid is already an in-room jid + occupant = self:get_occupant_by_nick(declinee); + end if occupant then self:route_to_occupant(occupant, decline); else |