aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-13 20:44:38 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-13 20:44:38 +0500
commit5d7f3a03ff16f1daeb4b2fe96475d9e5c1cbbcc9 (patch)
tree627e1d8e0a830925d609db4f4835175eb0d40f70 /plugins/muc
parentacd62439c3442630de3bd59ee1cdd3dcad6dd522 (diff)
downloadprosody-5d7f3a03ff16f1daeb4b2fe96475d9e5c1cbbcc9.tar.gz
prosody-5d7f3a03ff16f1daeb4b2fe96475d9e5c1cbbcc9.zip
MUC: Updated room:get_default_role() to not assign unaffiliated occupants a role in members-only rooms.
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 1e8b31e3..cf8946eb 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -91,7 +91,9 @@ function room_mt:get_default_role(affiliation)
elseif affiliation == "member" then
return "participant";
elseif not affiliation then
- return self:is_moderated() and "visitor" or "participant";
+ if not self:is_members_only() then
+ return self:is_moderated() and "visitor" or "participant";
+ end
end
end