# HG changeset patch
# User Jonas Wielicki <jonas@wielicki.name>
# Date 1519391236 -3600
# Node ID 0a3dced117f731bcb405f4eae7b59e9f8000be95
# Parent  f1a46eef9df1e1e27d6a01ad505399f3326d8c60
MUC: Emit 333 status code on presence as per XEP-0045 1.30 (fixes #1087)

diff -r f1a46eef9df1 -r 0a3dced117f7 plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Fri Oct 20 05:18:58 2017 +0200
+++ b/plugins/muc/muc.lib.lua	Fri Feb 23 14:07:16 2018 +0100
@@ -371,7 +371,8 @@
 		:tag('status'):text(error_message));
 	self:save_occupant(occupant);
 	local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";})
-		:tag("status", {code = "307"})
+		:tag("status", {code = "307"}):up()
+		:tag("status", {code = "333"})
 	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;});