diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-16 14:47:30 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-16 14:47:30 +0200 |
commit | a752f909e567a6b8fe94afbba668a382ec19dee2 (patch) | |
tree | 796f3a68741617ad84aad06bde9aac271a937a17 /plugins | |
parent | e74c9f90d954b5770f45022bf5ca4ba0fd587c41 (diff) | |
download | prosody-a752f909e567a6b8fe94afbba668a382ec19dee2.tar.gz prosody-a752f909e567a6b8fe94afbba668a382ec19dee2.zip |
mod_pubsub: Prepare to support turning notifications off for each kind of broadcast
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index d18d5f9f..b32aff5d 100644 --- a/plugins/mod_pubsub/mod_pubsub.lua +++ b/plugins/mod_pubsub/mod_pubsub.lua @@ -47,6 +47,11 @@ local function create_simple_itemstore(node_config, node_name) 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 |