From 1e2b0d97f08ab6f7ddb52d37dcde63fdb7171fbc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 16 Aug 2018 14:47:30 +0200 Subject: mod_pubsub: Prepare to support turning notifications off for each kind of broadcast --- plugins/mod_pubsub/mod_pubsub.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/mod_pubsub') 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 container end -- cgit v1.2.3