plugins/muc/muc.lib.lua
changeset 7421 e9f7043b86b5
parent 7419 c33a1d6da016
child 7426 63141a85beea
--- a/plugins/muc/muc.lib.lua	Wed May 04 11:08:51 2016 +0200
+++ b/plugins/muc/muc.lib.lua	Wed May 04 12:14:15 2016 +0200
@@ -531,10 +531,10 @@
 			if not is_first_dest_session then -- User is swapping into another pre-existing session
 				log("debug", "session %s is swapping into multisession %s, showing it leave.", real_jid, dest_occupant.nick);
 				-- Show the other session leaving
-				local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";})
-					:tag("status"):text("you are joining pre-existing session " .. dest_nick):up();
+				local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";});
 				add_item(x, self:get_affiliation(bare_jid), "none");
 				local pr = st.presence{from = dest_occupant.nick, to = real_jid, type = "unavailable"}
+					:tag("status"):text("you are joining pre-existing session " .. dest_nick):up()
 					:add_child(x);
 				self:route_stanza(pr);
 			end