Software /
code /
prosody
Changeset
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 |
parents | 12026:f3b09b8445b3 |
children | 12028:9ab202e942f5 |
files | plugins/muc/members_only.lib.lua plugins/muc/muc.lib.lua plugins/muc/password.lib.lua spec/scansion/muc_password.scs |
diffstat | 4 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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
--- 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: <presence from="room@conference.localhost/Juliet" type="error"> - <error type="auth" code="401" by="room@conference.localhost"> + <error type="auth" by="room@conference.localhost"> <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> </error> </presence>