Changeset

7418:e9f7043b86b5

MUC: Move status text out of <x> element (thanks Tobias)
author Kim Alvefur <zash@zash.se>
date Wed, 04 May 2016 12:14:15 +0200
parents 7417:4c8ee8175f5e
children 7422:41be97f8158f
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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