Merge 0.9->0.10 (third time lucky)
[prosody.git] / core / rostermanager.lua
index 5e06e3f7a4203ec5c82971f638f4b81322c9e74a..8c7612b450fe697fe21b81f9400c004b39743c51 100644 (file)
@@ -1,7 +1,7 @@
 -- Prosody IM
 -- Copyright (C) 2008-2010 Matthew Wild
 -- Copyright (C) 2008-2010 Waqas Hussain
--- 
+--
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
 --
@@ -15,7 +15,7 @@ local pairs = pairs;
 local tostring = tostring;
 
 local hosts = hosts;
-local bare_sessions = bare_sessions;
+local bare_sessions = prosody.bare_sessions;
 
 local datamanager = require "util.datamanager"
 local um_user_exists = require "core.usermanager".user_exists;
@@ -100,7 +100,7 @@ function load_roster(username, host)
                log("warn", "roster for %s has a self-contact", jid);
        end
        if not err then
-               hosts[host].events.fire_event("roster-load", username, host, roster);
+               hosts[host].events.fire_event("roster-load", { username = username, host = host, roster = roster });
        end
        return roster, err;
 end