Diff

plugins/mod_register.lua @ 5014:b2006c1cfa85

mod_announce, mod_motd, mod_pubsub, mod_register, mod_watchregistrations, mod_welcome: Use module:send() instead of core_*_stanza()
author Kim Alvefur <zash@zash.se>
date Thu, 26 Jul 2012 04:35:13 +0200
parent 4398:acc37e221940
child 5096:50a64fd79c07
line wrap: on
line diff
--- a/plugins/mod_register.lua	Thu Jul 26 04:33:17 2012 +0200
+++ b/plugins/mod_register.lua	Thu Jul 26 04:35:13 2012 +0200
@@ -120,10 +120,10 @@
 			for jid, item in pairs(roster) do
 				if jid and jid ~= "pending" then
 					if item.subscription == "both" or item.subscription == "from" or (roster.pending and roster.pending[jid]) then
-						core_post_stanza(hosts[host], st.presence({type="unsubscribed", from=bare, to=jid}));
+						module:send(st.presence({type="unsubscribed", from=bare, to=jid}));
 					end
 					if item.subscription == "both" or item.subscription == "to" or item.ask then
-						core_post_stanza(hosts[host], st.presence({type="unsubscribe", from=bare, to=jid}));
+						module:send(st.presence({type="unsubscribe", from=bare, to=jid}));
 					end
 				end
 			end