# HG changeset patch # User Waqas Hussain # Date 1228752502 -18000 # Node ID 64849cfa986958f6ddf922f4b54466049e9a8d0b # Parent 3758af511ce81ebf92746697b3c5da8a605b46b9 Changed mod_roster to use the newer presence manager API diff -r 3758af511ce8 -r 64849cfa9869 plugins/mod_roster.lua --- 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));