Software /
code /
prosody
Diff
plugins/mod_pubsub/mod_pubsub.lua @ 8808:40a7135eb6ac
mod_pubsub: Use moduleapi broadcast method
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 21 May 2018 01:25:10 +0200 |
parent | 8695:09e7fd8b16cd |
child | 8811:f2d35eee69c9 |
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)