Software /
code /
prosody
Changeset
1948:50128afa7858
Merge with 0.5
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 13 Oct 2009 15:00:59 +0500 |
parents | 1946:0eb3835ef9bf (current diff) 1947:ff2b86076e9c (diff) |
children | 1950:a1d186c8c65a |
files | |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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;