aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-07-02 19:55:08 +0100
committerMatthew Wild <mwild1@gmail.com>2010-07-02 19:55:08 +0100
commit7f0f97fd7f4bfdc314ed7a071a0eefc84a18f788 (patch)
treeb4c4a0ba4643904dbfef720c2072e724a98518dc /plugins
parente563e751d0f7293ebd22cc9d8896c6cd041c1bf6 (diff)
downloadprosody-7f0f97fd7f4bfdc314ed7a071a0eefc84a18f788.tar.gz
prosody-7f0f97fd7f4bfdc314ed7a071a0eefc84a18f788.zip
mod_privacy: Return the correct item-not-found instead of bad-request when a non-existent list is activated by the client (thanks teo)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_privacy.lua4
1 files changed, 3 insertions, 1 deletions
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