Software /
code /
prosody
Comparison
plugins/mod_pep.lua @ 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 |
parent | 9179:82fad995a149 |
child | 9190:b88f537163da |
comparison
equal
deleted
inserted
replaced
9188:ef2616ade453 | 9189:8fadd3d6c8d3 |
---|---|
121 end | 121 end |
122 end | 122 end |
123 | 123 |
124 local function get_broadcaster(username) | 124 local function get_broadcaster(username) |
125 local user_bare = jid_join(username, host); | 125 local user_bare = jid_join(username, host); |
126 local function simple_broadcast(kind, node, jids, item) | 126 local function simple_broadcast(kind, node, jids, item, _, node_obj) |
127 if node_obj then | |
128 if node_obj.config["notify_"..kind] == false then | |
129 return; | |
130 end | |
131 end | |
127 if kind == "retract" then | 132 if kind == "retract" then |
128 kind = "items"; -- XEP-0060 signals retraction in an <items> container | 133 kind = "items"; -- XEP-0060 signals retraction in an <items> container |
129 end | 134 end |
130 local message = st.message({ from = user_bare, type = "headline" }) | 135 local message = st.message({ from = user_bare, type = "headline" }) |
131 :tag("event", { xmlns = xmlns_pubsub_event }) | 136 :tag("event", { xmlns = xmlns_pubsub_event }) |