# HG changeset patch # User Kim Alvefur # Date 1520616183 -3600 # Node ID 43806beda970593ed2bc124ab457b736faeceae5 # Parent cea6165a03d04a67d9384be01b44bc833ace3f93 MUC: Move extraction of <{muc}x> earlier, to be used later to differentiate between join and presence update diff -r cea6165a03d0 -r 43806beda970 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Thu Jun 14 18:16:23 2018 +0200 +++ b/plugins/muc/muc.lib.lua Fri Mar 09 18:23:03 2018 +0100 @@ -477,6 +477,7 @@ 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 @@ 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