aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2014-04-01 10:02:58 -0400
committerWaqas Hussain <waqas20@gmail.com>2014-04-01 10:02:58 -0400
commit0c8605386437a149e30f5e23633e227607386da6 (patch)
tree6e4c1ab82f3d037383b9886e1cf6fe6c737366b1 /plugins/muc/muc.lib.lua
parent2f22ec3870c0e7dfcd4008bcfc4740fe83186622 (diff)
downloadprosody-0c8605386437a149e30f5e23633e227607386da6.tar.gz
prosody-0c8605386437a149e30f5e23633e227607386da6.zip
MUC: Fixed traceback when a JID not in a room requested a role change for an occupant.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 0dbe81fa..8028f5ae 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -1060,7 +1060,7 @@ function room_mt:can_set_role(actor_jid, occupant_jid, role)
if actor_jid == true then return true; end
local actor = self._occupants[self._jid_nick[actor_jid]];
- if actor.role == "moderator" then
+ if actor and actor.role == "moderator" then
if occupant.affiliation ~= "owner" and occupant.affiliation ~= "admin" then
if actor.affiliation == "owner" or actor.affiliation == "admin" then
return true;