diff -r d5fe0f9b377a -r ff2b86076e9c core/rostermanager.lua --- a/core/rostermanager.lua Mon Oct 05 18:39:28 2009 +0100 +++ b/core/rostermanager.lua Tue Oct 13 14:54:07 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;