aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/members_only.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-09-30 09:50:33 +0100
committerMatthew Wild <mwild1@gmail.com>2020-09-30 09:50:33 +0100
commitbf6c2db68257e8ac3a35e2c4e7c18b55313a5bf7 (patch)
tree3a37db7b805b1555d08cc61c7938cf512ff35ce0 /plugins/muc/members_only.lib.lua
parent2940b9c66f4a053dbe2ca038468a3a8791beccd5 (diff)
parentbd3bd2179be360f86c7db3fcd400dbb168fa8be5 (diff)
downloadprosody-bf6c2db68257e8ac3a35e2c4e7c18b55313a5bf7.tar.gz
prosody-bf6c2db68257e8ac3a35e2c4e7c18b55313a5bf7.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins/muc/members_only.lib.lua')
-rw-r--r--plugins/muc/members_only.lib.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/muc/members_only.lib.lua b/plugins/muc/members_only.lib.lua
index 4194c5c7..79077153 100644
--- a/plugins/muc/members_only.lib.lua
+++ b/plugins/muc/members_only.lib.lua
@@ -113,7 +113,7 @@ module:hook("muc-occupant-pre-join", function(event)
local stanza = event.stanza;
local affiliation = room:get_affiliation(stanza.attr.from);
if valid_affiliations[affiliation or "none"] <= valid_affiliations.none then
- local reply = st.error_reply(stanza, "auth", "registration-required"):up();
+ local reply = st.error_reply(stanza, "auth", "registration-required", nil, room.jid):up();
reply.tags[1].attr.code = "407";
event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
return true;
@@ -131,7 +131,7 @@ module:hook("muc-pre-invite", function(event)
local inviter_affiliation = room:get_affiliation(stanza.attr.from) or "none";
local required_affiliation = room._data.allow_member_invites and "member" or "admin";
if valid_affiliations[inviter_affiliation] < valid_affiliations[required_affiliation] then
- event.origin.send(st.error_reply(stanza, "auth", "forbidden"));
+ event.origin.send(st.error_reply(stanza, "auth", "forbidden", nil, room.jid));
return true;
end
end