aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-10-13 15:00:59 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-10-13 15:00:59 +0500
commitbc7fbf59cc383c4d3d4beb7054e75ba51b2396ca (patch)
tree2a2710b6cd20b314296d2080f282ef36bf488182 /core/rostermanager.lua
parent157842119d2b2f5ca6ba907e4a55c4da21d3d261 (diff)
parent193278754c23997fcbf1c7010ec6ac8da72cce90 (diff)
downloadprosody-bc7fbf59cc383c4d3d4beb7054e75ba51b2396ca.tar.gz
prosody-bc7fbf59cc383c4d3d4beb7054e75ba51b2396ca.zip
Merge with 0.5
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r--core/rostermanager.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 33fcf97a..ddff841e 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -112,9 +112,9 @@ function save_roster(username, host, roster)
--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;