Software / code / prosody
Comparison
plugins/muc/register.lib.lua @ 12028:9ab202e942f5
MUC: Fix error origin JID in wrong argument position
Mistake introduced in cbe524ed1a6a. Removing because this is a query to
the bare JID where the error origin matches the resulting stanza 'from'.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 08 Dec 2021 21:06:16 +0100 |
| parent | 11906:ba3344926e18 |
| child | 12029:631b2afa7bc1 |
comparison
equal
deleted
inserted
replaced
| 12027:5fb16f41f861 | 12028:9ab202e942f5 |
|---|---|
| 119 | 119 |
| 120 local function handle_register_iq(room, origin, stanza) | 120 local function handle_register_iq(room, origin, stanza) |
| 121 local user_jid = jid_bare(stanza.attr.from) | 121 local user_jid = jid_bare(stanza.attr.from) |
| 122 local affiliation = room:get_affiliation(user_jid); | 122 local affiliation = room:get_affiliation(user_jid); |
| 123 if affiliation == "outcast" then | 123 if affiliation == "outcast" then |
| 124 origin.send(st.error_reply(stanza, "auth", "forbidden", room.jid)); | 124 origin.send(st.error_reply(stanza, "auth", "forbidden")); |
| 125 return true; | 125 return true; |
| 126 elseif not (affiliation or allow_unaffiliated) then | 126 elseif not (affiliation or allow_unaffiliated) then |
| 127 origin.send(st.error_reply(stanza, "auth", "registration-required")); | 127 origin.send(st.error_reply(stanza, "auth", "registration-required")); |
| 128 return true; | 128 return true; |
| 129 end | 129 end |