Comparison

core/rostermanager.lua @ 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
parent 2046:3992541f8a48
child 2048:d420722519e1
comparison
equal deleted inserted replaced
2046:3992541f8a48 2047:fb236904c959
97 end 97 end
98 98
99 -- Attempt to load roster for non-loaded user 99 -- Attempt to load roster for non-loaded user
100 log("debug", "load_roster: loading for offline user: "..username.."@"..host); 100 log("debug", "load_roster: loading for offline user: "..username.."@"..host);
101 roster = datamanager.load(username, host, "roster") or {}; 101 roster = datamanager.load(username, host, "roster") or {};
102 if not roster[false] then roster[false] = { }; end
102 roster[username.."@"..host] = nil; 103 roster[username.."@"..host] = nil;
103 hosts[host].events.fire_event("roster-load", username, host, roster); 104 hosts[host].events.fire_event("roster-load", username, host, roster);
104 return roster; 105 return roster;
105 end 106 end
106 107