aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-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;