Comparison

core/sessionmanager.lua @ 77:531b981f2d17

Load roster on resource bind
author Waqas Hussain <waqas20@gmail.com>
date Wed, 08 Oct 2008 19:30:35 +0500
parent 57:126b25079399
child 99:ba08b8a4eeef
child 101:c690fa382743
comparison
equal deleted inserted replaced
73:937448005121 77:531b981f2d17
10 10
11 local modulemanager = require "core.modulemanager"; 11 local modulemanager = require "core.modulemanager";
12 local log = require "util.logger".init("sessionmanager"); 12 local log = require "util.logger".init("sessionmanager");
13 local error = error; 13 local error = error;
14 local uuid_generate = require "util.uuid".uuid_generate; 14 local uuid_generate = require "util.uuid".uuid_generate;
15 local rm_getroster = require "core.rostermanager".getroster
15 16
16 local newproxy = newproxy; 17 local newproxy = newproxy;
17 local getmetatable = getmetatable; 18 local getmetatable = getmetatable;
18 19
19 module "sessionmanager" 20 module "sessionmanager"
89 90
90 session.resource = resource; 91 session.resource = resource;
91 session.full_jid = session.username .. '@' .. session.host .. '/' .. resource; 92 session.full_jid = session.username .. '@' .. session.host .. '/' .. resource;
92 hosts[session.host].sessions[session.username].sessions[resource] = session; 93 hosts[session.host].sessions[session.username].sessions[resource] = session;
93 94
95 session.roster = rm_getroster(session.username, session.host);
96
94 return true; 97 return true;
95 end 98 end
96 99
97 function streamopened(session, attr) 100 function streamopened(session, attr)
98 local send = session.send; 101 local send = session.send;