Changeset

8808:40a7135eb6ac

mod_pubsub: Use moduleapi broadcast method
author Kim Alvefur <zash@zash.se>
date Mon, 21 May 2018 01:25:10 +0200
parents 8807:bf91de890107
children 8809:6cba2df3817c
files plugins/mod_pubsub/mod_pubsub.lua
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua	Sun May 20 02:40:08 2018 +0200
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Mon May 21 01:25:10 2018 +0200
@@ -52,11 +52,7 @@
 		:tag("event", { xmlns = xmlns_pubsub_event })
 			:tag(kind, { node = node })
 				:add_child(item);
-	for jid in pairs(jids) do
-		module:log("debug", "Sending notification to %s", jid);
-		message.attr.to = jid;
-		module:send(message);
-	end
+	module:broadcast(jids, message, pairs);
 end
 
 function is_item_stanza(item)