Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 6776:4412a2307c89
MUC: Fix logic error
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 17 Aug 2015 01:58:53 +0200 |
parent | 6769:4caef6d53304 |
child | 6801:5032d4817a30 |
comparison
equal
deleted
inserted
replaced
6775:22c8deb43daf | 6776:4412a2307c89 |
---|---|
1144 if actor == true then | 1144 if actor == true then |
1145 actor = nil -- So we can pass it safely to 'publicise_occupant_status' below | 1145 actor = nil -- So we can pass it safely to 'publicise_occupant_status' below |
1146 else | 1146 else |
1147 -- Can't do anything to other owners or admins | 1147 -- Can't do anything to other owners or admins |
1148 local occupant_affiliation = self:get_affiliation(occupant.bare_jid); | 1148 local occupant_affiliation = self:get_affiliation(occupant.bare_jid); |
1149 if occupant_affiliation == "owner" and occupant_affiliation == "admin" then | 1149 if occupant_affiliation == "owner" or occupant_affiliation == "admin" then |
1150 return nil, "cancel", "not-allowed"; | 1150 return nil, "cancel", "not-allowed"; |
1151 end | 1151 end |
1152 | 1152 |
1153 -- If you are trying to give or take moderator role you need to be an owner or admin | 1153 -- If you are trying to give or take moderator role you need to be an owner or admin |
1154 if occupant.role == "moderator" or role == "moderator" then | 1154 if occupant.role == "moderator" or role == "moderator" then |