MUC: Return item-not-found as error when attempting to change role of non-existant occupant

remotes/origin/0.11
Kim Alvefur 10 years ago
parent bcaeb22eb7
commit ffae2c113a
  1. 2
      plugins/muc/muc.lib.lua

@ -1184,7 +1184,7 @@ function room_mt:set_role(actor, occupant_jid, role, reason)
if not actor then return nil, "modify", "not-acceptable"; end
local occupant = self:get_occupant_by_nick(occupant_jid);
if not occupant then return nil, "modify", "not-acceptable"; end
if not occupant then return nil, "modify", "item-not-found"; end
if valid_roles[role or "none"] == nil then
return nil, "modify", "not-acceptable";

Loading…
Cancel
Save