Software /
code /
prosody
Changeset
3251:f2f9fe088f6e
MUC: Updated room:get_default_role() to assign unaffiliated occupants a "visitor" role in moderated rooms.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 13 Jun 2010 20:10:42 +0500 |
parents | 3250:38402e874b45 |
children | 3252:22062c50eabe |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sun Jun 13 20:08:51 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 20:10:42 2010 +0500 @@ -88,8 +88,10 @@ function room_mt:get_default_role(affiliation) if affiliation == "owner" or affiliation == "admin" then return "moderator"; - elseif affiliation == "member" or not affiliation then + elseif affiliation == "member" then return "participant"; + elseif not affiliation then + return self:is_moderated() and "visitor" or "participant"; end end