Comparison

mod_roster_command/mod_roster_command.lua @ 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
parent 1947:634b42541f5b
child 4326:f6fdefc5c6ac
comparison
equal deleted inserted replaced
1947:634b42541f5b 1948:2748aa8f36e0
14 return; 14 return;
15 end 15 end
16 16
17 17
18 -- Workaround for lack of util.startup... 18 -- Workaround for lack of util.startup...
19 _G.bare_sessions = _G.bare_sessions or {}; 19 local prosody = _G.prosody;
20 local hosts = prosody.hosts;
21 prosody.bare_sessions = prosody.bare_sessions or {};
22 _G.bare_sessions = _G.bare_sessions or prosody.bare_sessions;
20 23
21 local usermanager = require "core.usermanager"; 24 local usermanager = require "core.usermanager";
22 local rostermanager = require "core.rostermanager"; 25 local rostermanager = require "core.rostermanager";
23 local storagemanager = require "core.storagemanager"; 26 local storagemanager = require "core.storagemanager";
24 local jid = require "util.jid"; 27 local jid = require "util.jid";
25 local warn = require"util.prosodyctl".show_warning; 28 local warn = require"util.prosodyctl".show_warning;
26 local prosody = _G.prosody;
27 local hosts = prosody.hosts;
28 29
29 -- Make a *one-way* subscription. User will see when contact is online, 30 -- Make a *one-way* subscription. User will see when contact is online,
30 -- contact will not see when user is online. 31 -- contact will not see when user is online.
31 function subscribe(user_jid, contact_jid) 32 function subscribe(user_jid, contact_jid)
32 local user_username, user_host = jid.split(user_jid); 33 local user_username, user_host = jid.split(user_jid);