# HG changeset patch # User Matthew Wild # Date 1455884333 0 # Node ID d11154910be462dc3e31eb1108d7b05463d9ffda # Parent d843b7911d47061135785a890cf1c30e56df4baa# Parent 7ae430fecf12e613ee596adcbb0ebb370d7184fd Merge 0.10->trunk diff -r d843b7911d47 -r d11154910be4 core/rostermanager.lua --- 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