Software /
code /
prosody
Diff
plugins/mod_pubsub/mod_pubsub.lua @ 9181:79cf1f74738f
mod_pubsub: Prepare to support turning notifications off for each kind of broadcast
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Aug 2018 14:47:30 +0200 |
parent | 9179:82fad995a149 |
child | 9187:bd452e4f5a13 |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Mon Aug 13 20:44:01 2018 +0200 +++ b/plugins/mod_pubsub/mod_pubsub.lua Thu Aug 16 14:47:30 2018 +0200 @@ -47,6 +47,11 @@ end function simple_broadcast(kind, node, jids, item, actor, node_obj) + if node_obj then + if node_obj.config["notify_"..kind] == false then + return; + end + end if kind == "retract" then kind = "items"; -- XEP-0060 signals retraction in an <items> container end