From 2e8941ed51a3dd99881828fee433cf75e2c86be8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 9 Mar 2018 18:23:03 +0100 Subject: MUC: Move extraction of <{muc}x> earlier, to be used later to differentiate between join and presence update --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/muc') 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 , possibly desynced"); elseif orig_occupant ~= nil and muc_x then -- cgit v1.2.3