aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-03-09 18:23:03 +0100
committerKim Alvefur <zash@zash.se>2018-03-09 18:23:03 +0100
commit93df1fa04fae01c2462365695257ac9a8dac7985 (patch)
treee158e1def8ae1746ba40f8e62cbb109e6b4bb270
parent3237e9eb9d60644a756880173d6f8fd615bc478d (diff)
downloadprosody-93df1fa04fae01c2462365695257ac9a8dac7985.tar.gz
prosody-93df1fa04fae01c2462365695257ac9a8dac7985.zip
MUC: Move extraction of <{muc}x> earlier, to be used later to differentiate between join and presence update
-rw-r--r--plugins/muc/muc.lib.lua2
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