comparison plugins/muc/members_only.lib.lua @ 12029:631b2afa7bc1

MUC: Remove <{muc}x> tags in some errors Including the payload of the stanza that caused the error is optional and we're generally not doing it anywhere else.
author Kim Alvefur <zash@zash.se>
date Wed, 08 Dec 2021 21:55:25 +0100
parents 5fb16f41f861
children 74b9e05af71e
comparison
equal deleted inserted replaced
12028:9ab202e942f5 12029:631b2afa7bc1
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 event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); 125 event.origin.send(reply);
126 return true; 126 return true;
127 end 127 end
128 end 128 end
129 end, -5); 129 end, -5);
130 130