Changeset

1948:2748aa8f36e0

mod_roster_command: Update workaround to perhaps work in 0.10
author Kim Alvefur <zash@zash.se>
date Tue, 10 Nov 2015 19:19:15 +0100 (2015-11-10)
parents 1947:634b42541f5b
children 1949:6d2ec330fbcf
files mod_roster_command/mod_roster_command.lua
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_roster_command/mod_roster_command.lua	Tue Nov 10 17:47:43 2015 +0100
+++ b/mod_roster_command/mod_roster_command.lua	Tue Nov 10 19:19:15 2015 +0100
@@ -16,15 +16,16 @@
 
 
 -- Workaround for lack of util.startup...
-_G.bare_sessions = _G.bare_sessions or {};
+local prosody = _G.prosody;
+local hosts = prosody.hosts;
+prosody.bare_sessions = prosody.bare_sessions or {};
+_G.bare_sessions = _G.bare_sessions or prosody.bare_sessions;
 
 local usermanager = require "core.usermanager";
 local rostermanager = require "core.rostermanager";
 local storagemanager = require "core.storagemanager";
 local jid = require "util.jid";
 local warn = require"util.prosodyctl".show_warning;
-local prosody = _G.prosody;
-local hosts = prosody.hosts;
 
 -- Make a *one-way* subscription. User will see when contact is online,
 -- contact will not see when user is online.