aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-12-19 23:14:13 +0000
committerMatthew Wild <mwild1@gmail.com>2018-12-19 23:14:13 +0000
commit9f7026fd496b72ae05a6050d037dd573cbda6f7a (patch)
tree2a03a484a66856eae94362c8f2e7b9413a8c6531
parentce96a5b669bc4ae03c7b8681f723bbe2325ccbf1 (diff)
downloadprosody-9f7026fd496b72ae05a6050d037dd573cbda6f7a.tar.gz
prosody-9f7026fd496b72ae05a6050d037dd573cbda6f7a.zip
MUC: Adjust priorities of muc-get-default-role handlers (fixes #1272)
-rw-r--r--plugins/muc/members_only.lib.lua2
-rw-r--r--plugins/muc/muc.lib.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/muc/members_only.lib.lua b/plugins/muc/members_only.lib.lua
index cd9f777e..4194c5c7 100644
--- a/plugins/muc/members_only.lib.lua
+++ b/plugins/muc/members_only.lib.lua
@@ -104,7 +104,7 @@ module:hook("muc-get-default-role", function(event)
if not event.affiliation and get_members_only(event.room) then
return false;
end
-end);
+end, 2);
-- registration required for entering members-only room
module:hook("muc-occupant-pre-join", function(event)
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 7a7ddf41..96cd0ffa 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -61,7 +61,7 @@ module:hook("muc-get-default-role", function(event)
elseif event.affiliation_rank >= valid_affiliations.none then
return "participant";
end
-end);
+end, -1);
--- Occupant functions
function room_mt:new_occupant(bare_real_jid, nick)