Changeset

9189:8fadd3d6c8d3

mod_pep: Respect settings for which kinds of notifications to send
author Kim Alvefur <zash@zash.se>
date Thu, 16 Aug 2018 15:34:58 +0200
parents 9188:ef2616ade453
children 9190:b88f537163da
files plugins/mod_pep.lua
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pep.lua	Thu Aug 16 15:20:29 2018 +0200
+++ b/plugins/mod_pep.lua	Thu Aug 16 15:34:58 2018 +0200
@@ -123,7 +123,12 @@
 
 local function get_broadcaster(username)
 	local user_bare = jid_join(username, host);
-	local function simple_broadcast(kind, node, jids, item)
+	local function simple_broadcast(kind, node, jids, item, _, 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