Mercurial > prosody-hg
comparison plugins/muc/members_only.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 |
| parents | 3bbb1af92514 |
| children | 631b2afa7bc1 |
comparison
equal
deleted
inserted
replaced
| 12026:f3b09b8445b3 | 12027:5fb16f41f861 |
|---|---|
| 120 if get_members_only(room) then | 120 if get_members_only(room) then |
| 121 local stanza = event.stanza; | 121 local stanza = event.stanza; |
| 122 local affiliation = room:get_affiliation(stanza.attr.from); | 122 local affiliation = room:get_affiliation(stanza.attr.from); |
| 123 if valid_affiliations[affiliation or "none"] <= valid_affiliations.none then | 123 if valid_affiliations[affiliation or "none"] <= valid_affiliations.none then |
| 124 local reply = st.error_reply(stanza, "auth", "registration-required", nil, room.jid):up(); | 124 local reply = st.error_reply(stanza, "auth", "registration-required", nil, room.jid):up(); |
| 125 reply.tags[1].attr.code = "407"; | |
| 126 event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); | 125 event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); |
| 127 return true; | 126 return true; |
| 128 end | 127 end |
| 129 end | 128 end |
| 130 end, -5); | 129 end, -5); |
