Changeset

1784:b2bfd3b93da6

ejabberd2prosody: Fixed a problem with null roster groups.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 18 Sep 2009 05:16:26 +0500
parents 1783:f79972ad8965
children 1788:45779d67c26c
files tools/ejabberd2prosody.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/ejabberd2prosody.lua	Fri Sep 18 02:11:16 2009 +0500
+++ b/tools/ejabberd2prosody.lua	Fri Sep 18 05:16:26 2009 +0500
@@ -104,7 +104,11 @@
 		else error("Unknown ask type: "..ask); end
 		if subscription ~= "both" and subscription ~= "from" and subscription ~= "to" and subscription ~= "none" then error(subscription) end
 		local item = {name = name, ask = ask, subscription = subscription, groups = {}};
-		for _, g in ipairs(groups) do item.groups[g] = true; end
+		for _, g in ipairs(groups) do
+			if type(g) == "string" then
+				item.groups[g] = true;
+			end
+		end
 		roster(node, host, contact, item);
 	end;
 	private_storage = function(tuple)