aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-02-19 12:18:53 +0000
committerMatthew Wild <mwild1@gmail.com>2016-02-19 12:18:53 +0000
commit9e960c96e70ead67889c4d6fbc91b0260340887d (patch)
tree83d4920cd9d60bef48ee9a465978f102927addea /core/rostermanager.lua
parent4c7d2c5ba6e64b5041aec931f48279cfeba1155d (diff)
parentef8fdb1846f38673a2a53ae7f146418d30104b51 (diff)
downloadprosody-9e960c96e70ead67889c4d6fbc91b0260340887d.tar.gz
prosody-9e960c96e70ead67889c4d6fbc91b0260340887d.zip
Merge 0.10->trunk
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r--core/rostermanager.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 176eba5b..7f6fb82a 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -20,6 +20,7 @@ local bare_sessions = prosody.bare_sessions;
local um_user_exists = require "core.usermanager".user_exists;
local st = require "util.stanza";
+local storagemanager = require "core.storagemanager";
local _ENV = nil;
@@ -108,7 +109,7 @@ local function load_roster(username, host)
else -- Attempt to load roster for non-loaded user
log("debug", "load_roster: loading for offline user: %s@%s", username, host);
end
- local roster_store = require "core.storagemanager".open(host, "roster", "keyval");
+ local roster_store = storagemanager.open(host, "roster", "keyval");
local data, err = roster_store:get(username);
roster = data or {};
if user then user.roster = roster; end
@@ -144,10 +145,10 @@ function save_roster(username, host, roster, jid)
end
if metadata.broken then return nil, "Not saving broken roster" end
if jid == nil then
- local roster_store = require "core.storagemanager".open(host, "roster", "keyval");
+ local roster_store = storagemanager.open(host, "roster", "keyval");
return roster_store:set(username, roster);
else
- local roster_store = require "core.storagemanager".open(host, "roster", "map");
+ local roster_store = storagemanager.open(host, "roster", "map");
return roster_store:set_keys(username, { [false] = metadata, [jid] = roster[jid] or roster_store.remove });
end
end