mod_posix: Some (perhaps temporary) changes to re-lock the pidfile after truncating...
[prosody.git] / plugins / mod_privacy.lua
index 10f44950a47151287e8eee57efca4a86fb497522..5355e527654f2a7aa1e8b9a04e3700ab21d8708d 100644 (file)
@@ -7,6 +7,8 @@
 -- COPYING file in the source package for more information.
 --
 
+module:add_feature("jabber:iq:privacy");
+
 local prosody = prosody;
 local st = require "util.stanza";
 local datamanager = require "util.datamanager";
@@ -93,8 +95,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