Comparison

plugins/muc/password.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
parent 12027:5fb16f41f861
child 12977:74b9e05af71e
comparison
equal deleted inserted replaced
12028:9ab202e942f5 12029:631b2afa7bc1
49 if not password or password == "" then password = nil; end 49 if not password or password == "" then password = nil; end
50 if get_password(room) ~= password then 50 if get_password(room) ~= password then
51 local from, to = stanza.attr.from, stanza.attr.to; 51 local from, to = stanza.attr.from, stanza.attr.to;
52 module:log("debug", "%s couldn't join due to invalid password: %s", from, to); 52 module:log("debug", "%s couldn't join due to invalid password: %s", from, to);
53 local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up(); 53 local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up();
54 event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); 54 event.origin.send(reply);
55 return true; 55 return true;
56 end 56 end
57 end, -20); 57 end, -20);
58 58
59 -- Add password to outgoing invite 59 -- Add password to outgoing invite