Diff

plugins/muc/muc.lib.lua @ 12029:631b2afa7bc1

MUC: Remove <{muc}x> tags in some errors Including the payload of the stanza that caused the error is optional and we're generally not doing it anywhere else.
author Kim Alvefur <zash@zash.se>
date Wed, 08 Dec 2021 21:55:25 +0100
parent 12027:5fb16f41f861
child 12109:83bec90a352c
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Wed Dec 08 21:06:16 2021 +0100
+++ b/plugins/muc/muc.lib.lua	Wed Dec 08 21:55:25 2021 +0100
@@ -449,7 +449,7 @@
 	local affiliation = room:get_affiliation(stanza.attr.from);
 	if affiliation == "outcast" then
 		local reply = st.error_reply(stanza, "auth", "forbidden", nil, room.jid):up();
-		event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+		event.origin.send(reply);
 		return true;
 	end
 end, -10);
@@ -691,7 +691,7 @@
 		-- new nick or has different bare real jid
 		log("debug", "%s couldn't join due to nick conflict: %s", real_jid, dest_occupant.nick);
 		local reply = st.error_reply(stanza, "cancel", "conflict", nil, self.jid):up();
-		origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+		origin.send(reply);
 		return true;
 	end