Changeset

2047:fb236904c959

rostermanager: Ensure meta-data entry is present on roster load.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 22 Oct 2009 03:34:50 +0500
parents 2046:3992541f8a48
children 2048:d420722519e1
files core/rostermanager.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/rostermanager.lua	Thu Oct 22 03:34:08 2009 +0500
+++ b/core/rostermanager.lua	Thu Oct 22 03:34:50 2009 +0500
@@ -99,6 +99,7 @@
 	-- Attempt to load roster for non-loaded user
 	log("debug", "load_roster: loading for offline user: "..username.."@"..host);
 	roster = datamanager.load(username, host, "roster") or {};
+	if not roster[false] then roster[false] = { }; end
 	roster[username.."@"..host] = nil;
 	hosts[host].events.fire_event("roster-load", username, host, roster);
 	return roster;