aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-12-08 21:08:22 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-12-08 21:08:22 +0500
commitdf217cc0f1d3dadaf883fcc6d8a36a2d87aa3d75 (patch)
tree1b66f0b629498bdd97d18fc4a1d343feb2738db4
parent17f4b2de32a2b8d83d9b4dabef5abe88ad368692 (diff)
downloadprosody-df217cc0f1d3dadaf883fcc6d8a36a2d87aa3d75.tar.gz
prosody-df217cc0f1d3dadaf883fcc6d8a36a2d87aa3d75.zip
Changed mod_roster to use the newer presence manager API
-rw-r--r--plugins/mod_roster.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/mod_roster.lua b/plugins/mod_roster.lua
index 7e114b17..bbd678b8 100644
--- a/plugins/mod_roster.lua
+++ b/plugins/mod_roster.lua
@@ -24,10 +24,11 @@ local st = require "util.stanza"
local jid_split = require "util.jid".split;
local t_concat = table.concat;
-local handle_outbound_presence_subscriptions_and_probes = require "core.presencemanager".handle_outbound_presence_subscriptions_and_probes;
+local handle_presence = require "core.presencemanager".handle_presence;
local rm_remove_from_roster = require "core.rostermanager".remove_from_roster;
local rm_add_to_roster = require "core.rostermanager".add_to_roster;
local rm_roster_push = require "core.rostermanager".roster_push;
+local core_route_stanza = core_route_stanza;
module:add_feature("jabber:iq:roster");
@@ -74,11 +75,11 @@ module:add_iq_handler("c2s", "jabber:iq:roster",
session.send(st.reply(stanza));
rm_roster_push(from_node, from_host, item.attr.jid);
if r_item.subscription == "both" or r_item.subscription == "from" then
- handle_outbound_presence_subscriptions_and_probes(session,
- st.presence({type="unsubscribed"}), from_bare, to_bare);
+ handle_presence(session, st.presence({type="unsubscribed"}), from_bare, to_bare,
+ core_route_stanza, false);
elseif r_item.subscription == "both" or r_item.subscription == "to" then
- handle_outbound_presence_subscriptions_and_probes(session,
- st.presence({type="unsubscribe"}), from_bare, to_bare);
+ handle_presence(session, st.presence({type="unsubscribe"}), from_bare, to_bare,
+ core_route_stanza, false);
end
else
session.send(st.error_reply(stanza, err_type, err_cond, err_msg));