# HG changeset patch # User Kim Alvefur # Date 1638993734 -3600 # Node ID 5fb16f41f861a6f77a82ca104f5ea6c2086b5304 # Parent f3b09b8445b37e09374d48d8baa6ce02172237e7 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. diff -r f3b09b8445b3 -r 5fb16f41f861 plugins/muc/members_only.lib.lua --- a/plugins/muc/members_only.lib.lua Wed Dec 08 16:40:51 2021 +0100 +++ b/plugins/muc/members_only.lib.lua Wed Dec 08 21:02:14 2021 +0100 @@ -122,7 +122,6 @@ local affiliation = room:get_affiliation(stanza.attr.from); if valid_affiliations[affiliation or "none"] <= valid_affiliations.none then local reply = st.error_reply(stanza, "auth", "registration-required", nil, room.jid):up(); - reply.tags[1].attr.code = "407"; event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); return true; end diff -r f3b09b8445b3 -r 5fb16f41f861 plugins/muc/muc.lib.lua --- 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 diff -r f3b09b8445b3 -r 5fb16f41f861 plugins/muc/password.lib.lua --- a/plugins/muc/password.lib.lua Wed Dec 08 16:40:51 2021 +0100 +++ b/plugins/muc/password.lib.lua Wed Dec 08 21:02:14 2021 +0100 @@ -51,7 +51,6 @@ local from, to = stanza.attr.from, stanza.attr.to; module:log("debug", "%s couldn't join due to invalid password: %s", from, to); local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up(); - reply.tags[1].attr.code = "401"; event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); return true; end diff -r f3b09b8445b3 -r 5fb16f41f861 spec/scansion/muc_password.scs --- a/spec/scansion/muc_password.scs Wed Dec 08 16:40:51 2021 +0100 +++ b/spec/scansion/muc_password.scs Wed Dec 08 21:02:14 2021 +0100 @@ -58,7 +58,7 @@ Juliet receives: - +