# HG changeset patch # User Kim Alvefur # Date 1526858710 -7200 # Node ID 40a7135eb6ac861118e3ea5bdd1f533b8804e1ff # Parent bf91de8901077e6ae778d9dc473644cbd5c058b3 mod_pubsub: Use moduleapi broadcast method diff -r bf91de890107 -r 40a7135eb6ac plugins/mod_pubsub/mod_pubsub.lua --- 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)