# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1499095933 -7200
# Node ID 627689c058aa1b494cba07b8c66f2a0ea948248e
# Parent  a6574fdf873477f98ca6608aba477da6f390908d
Backed out changeset a6574fdf8734, violates XEP-0045

diff -r a6574fdf8734 -r 627689c058aa plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Mon Jun 26 01:03:51 2017 +0200
+++ b/plugins/muc/muc.lib.lua	Mon Jul 03 17:32:13 2017 +0200
@@ -349,11 +349,8 @@
 	occupant:set_session(real_jid, st.presence({type="unavailable"})
 		:tag('status'):text(error_message));
 	self:save_occupant(occupant);
-	local x = {
-		base = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";});
-		self = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";})
-			:tag("status", {code = "307"});
-	};
+	local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";})
+		:tag("status", {code = "307"})
 	self:publicise_occupant_status(occupant, x);
 	if occupant.jid == real_jid then -- Was last session
 		module:fire_event("muc-occupant-left", {room = self; nick = occupant.nick; occupant = occupant;});
@@ -1301,11 +1298,7 @@
 
 	local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user"});
 	if not role then
-		x = {
-			base = x;
-			self = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user"})
-				:tag("status", {code = "307"}):up();
-		};
+		x:tag("status", {code = "307"}):up();
 	end
 	occupant.role = role;
 	self:save_occupant(occupant);