From 14493ad437346135e7ecf5c6380b6f6b23f1b2ea Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 19 Apr 2016 18:43:15 +0200 Subject: [PATCH] MUC: Return item-not-found as error when attempting to change role of non-existant occupant --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 470d199e..18f40758 100644 --- a/plugins/muc/muc.lib.lua +++ b/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"; -- 2.30.2