# HG changeset patch # User Kim Alvefur # Date 1534423650 -7200 # Node ID 79cf1f74738fa7aaac4ef859ced1b46855a18646 # Parent cc68cb03f85e1f93d6e6cb824e9ad05ee8c26dfd mod_pubsub: Prepare to support turning notifications off for each kind of broadcast diff -r cc68cb03f85e -r 79cf1f74738f plugins/mod_pubsub/mod_pubsub.lua --- 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 container end