Software /
code /
prosody
Changeset
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 |
parents | 9180:cc68cb03f85e |
children | 9182:ec48c02ded0c |
files | plugins/mod_pubsub/mod_pubsub.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
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