# HG changeset patch # User Waqas Hussain <waqas20@gmail.com> # Date 1255428059 -18000 # Node ID 50128afa7858f5008291309f2dc76b2c679ca5a6 # Parent 0eb3835ef9bfd2d67064f08b5f7213c3c0fb6452# Parent ff2b86076e9cecabf7feda4b12e38be59196b857 Merge with 0.5 diff -r 0eb3835ef9bf -r 50128afa7858 core/rostermanager.lua --- 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;