aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-07-15 11:43:23 +0100
committerMatthew Wild <mwild1@gmail.com>2013-07-15 11:43:23 +0100
commit71ab938d534d425b388ab0d76204b3a232bcadce (patch)
treee24069ba5abcb41a0498819a72e7407f4ac38711
parent7a8fd288b5e7a979317e9cf6fe594c8bf1eadb6f (diff)
downloadprosody-71ab938d534d425b388ab0d76204b3a232bcadce.tar.gz
prosody-71ab938d534d425b388ab0d76204b3a232bcadce.zip
rostermanager, mod_groups: Change roster-load event to pass an event table for consistency
-rw-r--r--core/rostermanager.lua2
-rw-r--r--plugins/mod_groups.lua4
2 files changed, 4 insertions, 2 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 5e06e3f7..4c669eac 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -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
diff --git a/plugins/mod_groups.lua b/plugins/mod_groups.lua
index f7f632c2..dc6976d4 100644
--- a/plugins/mod_groups.lua
+++ b/plugins/mod_groups.lua
@@ -17,11 +17,13 @@ local jid_prep = jid.prep;
local module_host = module:get_host();
-function inject_roster_contacts(username, host, roster)
+function inject_roster_contacts(event)
+ local username, host= event.username, event.host;
--module:log("debug", "Injecting group members to roster");
local bare_jid = username.."@"..host;
if not members[bare_jid] and not members[false] then return; end -- Not a member of any groups
+ local roster = event.roster;
local function import_jids_to_roster(group_name)
for jid in pairs(groups[group_name]) do
-- Add them to roster