plugins/muc/muc.lib.lua
changeset 8915 43806beda970
parent 8894 d9b7db6f140f
child 8916 560419b759c8
--- 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 <x>, possibly desynced");
 	elseif orig_occupant ~= nil and muc_x then