Changeset

7168:d11154910be4

Merge 0.10->trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 19 Feb 2016 12:18:53 +0000
parents 7166:d843b7911d47 (current diff) 7167:7ae430fecf12 (diff)
children 7171:91d36a37a9ff
files
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/core/rostermanager.lua	Thu Feb 18 19:09:37 2016 +0100
+++ b/core/rostermanager.lua	Fri Feb 19 12:18:53 2016 +0000
@@ -20,6 +20,7 @@
 
 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 @@
 	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 @@
 		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