From 7f0f97fd7f4bfdc314ed7a071a0eefc84a18f788 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 2 Jul 2010 19:55:08 +0100 Subject: mod_privacy: Return the correct item-not-found instead of bad-request when a non-existent list is activated by the client (thanks teo) --- plugins/mod_privacy.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_privacy.lua b/plugins/mod_privacy.lua index 57538ccd..2f3b4863 100644 --- a/plugins/mod_privacy.lua +++ b/plugins/mod_privacy.lua @@ -93,8 +93,10 @@ function activateList(privacy_lists, origin, stanza, which, name) elseif which == "active" and list then origin.activePrivacyList = name; origin.send(st.reply(stanza)); + elseif not list then + return {"cancel", "item-not-found", "No such list: "..name}; else - return {"modify", "bad-request", "Either not active or default given or unknown list name specified."}; + return {"modify", "bad-request", "No list chosen to be active or default."}; end return true; end -- cgit v1.2.3