Diff

plugins/muc/muc.lib.lua @ 7396:71a7140200fc

MUC: Return item-not-found as error when attempting to change role of non-existant occupant
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 18:43:15 +0200
parent 7386:5a9af30d5737
child 7397:e49737de9872
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Tue Apr 19 18:23:44 2016 +0200
+++ b/plugins/muc/muc.lib.lua	Tue Apr 19 18:43:15 2016 +0200
@@ -1184,7 +1184,7 @@
 	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";