Software /
code /
prosody
Changeset
1947:ff2b86076e9c
rostermanager: Fixed a traceback on roster save.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 13 Oct 2009 14:54:07 +0500 |
parents | 1922:d5fe0f9b377a |
children | 1948:50128afa7858 1949:e3d777d76b1a |
files | core/rostermanager.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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;