From 449311b2d112182be22ab9bef06ae00d200726e9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 8 Dec 2021 21:55:25 +0100 Subject: 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. --- plugins/muc/muc.lib.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/muc/muc.lib.lua') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 5e39d317..01cf22f6 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -449,7 +449,7 @@ module:hook("muc-occupant-pre-join", function(event) 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 @@ function room_mt:handle_normal_presence(origin, stanza) -- 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 -- cgit v1.2.3