Changeset

609:64849cfa9869

Changed mod_roster to use the newer presence manager API
author Waqas Hussain <waqas20@gmail.com>
date Mon, 08 Dec 2008 21:08:22 +0500
parents 608:3758af511ce8
children 610:d98106902f74
files plugins/mod_roster.lua
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_roster.lua	Mon Dec 08 21:06:41 2008 +0500
+++ b/plugins/mod_roster.lua	Mon Dec 08 21:08:22 2008 +0500
@@ -24,10 +24,11 @@
 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 @@
 											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));