Diff

plugins/muc/muc.lib.lua @ 12027:5fb16f41f861

MUC: Remove remaining deprecated numeric error codes The numeric error codes seems to have been removed from the examples in XEP-0045 version 1.24, and were deprecated even by RFC 3920 in 2004, only allowed for backwards compatibility.
author Kim Alvefur <zash@zash.se>
date Wed, 08 Dec 2021 21:02:14 +0100
parent 12026:f3b09b8445b3
child 12029:631b2afa7bc1
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Wed Dec 08 16:40:51 2021 +0100
+++ b/plugins/muc/muc.lib.lua	Wed Dec 08 21:02:14 2021 +0100
@@ -449,7 +449,6 @@
 	local affiliation = room:get_affiliation(stanza.attr.from);
 	if affiliation == "outcast" then
 		local reply = st.error_reply(stanza, "auth", "forbidden", nil, room.jid):up();
-		reply.tags[1].attr.code = "403";
 		event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
 		return true;
 	end
@@ -692,7 +691,6 @@
 		-- 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();
-		reply.tags[1].attr.code = "409";
 		origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
 		return true;
 	end