# HG changeset patch # User Kim Alvefur # Date 1343780544 -7200 # Node ID 295ae44b8a010f1974e4ead122de6b4883dfd09b # Parent 92c6f84ec446c31765f4345294bc694f479718a4 mod_remote_roster: Replace use of core_post_stanza() with module:send() diff -r 92c6f84ec446 -r 295ae44b8a01 mod_remote_roster/mod_remote_roster.lua --- a/mod_remote_roster/mod_remote_roster.lua Sun Jul 29 22:24:11 2012 +0200 +++ b/mod_remote_roster/mod_remote_roster.lua Wed Aug 01 02:22:24 2012 +0200 @@ -17,7 +17,6 @@ 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_post_stanza = core_post_stanza; local user_exists = require "core.usermanager".user_exists; local add_task = require "util.timer".add_task; @@ -76,10 +75,10 @@ if r_item then local to_bare = node and (node.."@"..host) or host; -- bare JID --if r_item.subscription == "both" or r_item.subscription == "from" or (roster.pending and roster.pending[jid]) then - -- core_post_stanza(hosts[module.host], st.presence({type="unsubscribed", from=stanza.attr.to, to=to_bare})); + -- module:send(st.presence({type="unsubscribed", from=stanza.attr.to, to=to_bare})); --end --if r_item.subscription == "both" or r_item.subscription == "to" or r_item.ask then - -- core_post_stanza(hosts[module.host], st.presence({type="unsubscribe", from=stanza.attr.to, to=to_bare})); + -- module:send(st.presence({type="unsubscribe", from=stanza.attr.to, to=to_bare})); --end roster[jid] = nil; if save_roster(from_node, from_host, roster) then @@ -150,7 +149,7 @@ end stanza:up(); -- move out from item stanza:up(); -- move out from stanza - core_post_stanza(hosts[module.host], stanza); + module:send(stanza); end end