Software /
code /
prosody
Changeset
3068:fc7c693e094a
mod_privacy: Remove validation that checks a roster group you block actually exists - it would be time-consuming on large rosters, and isn't important (or correct?) anyway.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 21 May 2010 19:19:29 +0100 |
parents | 3066:5e5137057b5f |
children | 3069:c3df9053e0a9 |
files | plugins/mod_privacy.lua |
diffstat | 1 files changed, 1 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_privacy.lua Thu May 20 11:51:55 2010 +0100 +++ b/plugins/mod_privacy.lua Fri May 21 19:19:29 2010 +0100 @@ -160,26 +160,7 @@ end end - if tmp.type == "group" then - local found = false; - local roster = load_roster(origin.username, origin.host); - for jid,item in pairs(roster) do - if item.groups ~= nil then - for group in pairs(item.groups) do - if group == tmp.value then - found = true; - break; - end - end - if found == true then - break; - end - end - end - if found == false then - return {"cancel", "item-not-found", "Specifed roster group not existing."}; - end - elseif tmp.type == "subscription" then + if tmp.type == "subscription" then if tmp.value ~= "both" and tmp.value ~= "to" and tmp.value ~= "from" and