core/rostermanager.lua

changeset 925
4861bcf0afa4
parent 916
f0743928ef7e
child 1380
9b3b43b8963a
--- a/core/rostermanager.lua	Mon Mar 30 01:57:51 2009 +0500
+++ b/core/rostermanager.lua	Mon Mar 30 02:02:59 2009 +0500
@@ -224,6 +224,10 @@
 	if is_contact_pending_in(username, host, jid) then
 		local roster = load_roster(username, host);
 		local item = roster[jid];
+		if not item then -- FIXME should roster item be auto-created?
+			item = {subscription = "none", groups = {}};
+			roster[jid] = item;
+		end
 		if item.subscription == "none" then
 			item.subscription = "from";
 		else -- subscription == to

mercurial