Merge with 0.5

Tue, 13 Oct 2009 15:00:59 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Tue, 13 Oct 2009 15:00:59 +0500
changeset 1948
50128afa7858
parent 1946
0eb3835ef9bf (current diff)
parent 1947
ff2b86076e9c (diff)
child 1950
a1d186c8c65a

Merge with 0.5

--- a/core/rostermanager.lua	Tue Oct 13 14:58:45 2009 +0500
+++ b/core/rostermanager.lua	Tue Oct 13 15:00:59 2009 +0500
@@ -112,9 +112,9 @@
 		--end
 	end
 	if roster then
-		local roster = hosts[host].sessions[username].roster;
-		roster[false].version = (roster[false].version or 1) + 1;
-		return datamanager.store(username, host, "roster", hosts[host].sessions[username].roster);
+		if not roster[false] then roster[false] = {}; end
+		roster[false].version = (roster[false].version or 0) + 1;
+		return datamanager.store(username, host, "roster", roster);
 	end
 	log("warn", "save_roster: user had no roster to save");
 	return nil;

mercurial