diff options
author | Kim Alvefur <zash@zash.se> | 2018-03-09 18:23:03 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-03-09 18:23:03 +0100 |
commit | 2e8941ed51a3dd99881828fee433cf75e2c86be8 (patch) | |
tree | e158e1def8ae1746ba40f8e62cbb109e6b4bb270 /plugins/muc | |
parent | 259d4a6180ff2b3447dba0636e859d81a7c6c27b (diff) | |
download | prosody-2e8941ed51a3dd99881828fee433cf75e2c86be8.tar.gz prosody-2e8941ed51a3dd99881828fee433cf75e2c86be8.zip |
MUC: Move extraction of <{muc}x> earlier, to be used later to differentiate between join and presence update
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index a7bd9d9c..40fdc5a0 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -477,6 +477,7 @@ function room_mt:handle_normal_presence(origin, stanza) local real_jid = stanza.attr.from; local bare_jid = jid_bare(real_jid); local orig_occupant = self:get_occupant_by_real_jid(real_jid); + local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc"); local is_first_dest_session; local dest_occupant; if type == "unavailable" then @@ -504,7 +505,6 @@ function room_mt:handle_normal_presence(origin, stanza) end -- TODO Handle these cases sensibly - local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc"); if orig_occupant == nil and not muc_x then module:log("debug", "Join without <x>, possibly desynced"); elseif orig_occupant ~= nil and muc_x then |