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.

Fri, 21 May 2010 19:19:29 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 21 May 2010 19:19:29 +0100
changeset 3068
fc7c693e094a
parent 3066
5e5137057b5f
child 3069
c3df9053e0a9

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.

plugins/mod_privacy.lua file | annotate | diff | comparison | revisions
--- 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

mercurial