aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/password.lib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc/password.lib.lua')
-rw-r--r--plugins/muc/password.lib.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/muc/password.lib.lua b/plugins/muc/password.lib.lua
index 1f4b2add..dd3cb658 100644
--- a/plugins/muc/password.lib.lua
+++ b/plugins/muc/password.lib.lua
@@ -50,9 +50,8 @@ module:hook("muc-occupant-pre-join", function(event)
if get_password(room) ~= password then
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"):up();
- reply.tags[1].attr.code = "401";
- event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+ local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up();
+ event.origin.send(reply);
return true;
end
end, -20);