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
e.stanza.attr.from = e.stanza.attr.from .. "/" .. session.resource;
end
end
- if session.username then -- FIXME do properly
- return checkIfNeedToBeBlocked(e, session);
- end
+ return checkIfNeedToBeBlocked(e, session);
end
module:hook("pre-message/full", preCheckOutgoing, 500);