Changeset

8912:43806beda970

MUC: Move extraction of <{muc}x> earlier, to be used later to differentiate between join and presence update
author Kim Alvefur <zash@zash.se>
date Fri, 09 Mar 2018 18:23:03 +0100
parents 8911:cea6165a03d0
children 8913:560419b759c8
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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