# HG changeset patch # User Kim Alvefur # Date 1587219521 -7200 # Node ID 7835b9f14cb8e6a70871d9f158f5c318b1e3b624 # Parent 144a1ee24a4e294907d91fd68d10c03d2c74047b mod_csi_simple: Allow configuring extra tags indicating importance diff -r 144a1ee24a4e -r 7835b9f14cb8 plugins/mod_csi_simple.lua --- a/plugins/mod_csi_simple.lua Tue Apr 14 16:51:24 2020 +0200 +++ b/plugins/mod_csi_simple.lua Sat Apr 18 16:18:41 2020 +0200 @@ -1,4 +1,4 @@ --- Copyright (C) 2016-2018 Kim Alvefur +-- Copyright (C) 2016-2020 Kim Alvefur -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. @@ -13,6 +13,8 @@ local queue_size = module:get_option_number("csi_queue_size", 256); +local important_payloads = module:get_option_set("csi_important_payloads", { }); + module:hook("csi-is-stanza-important", function (event) local stanza = event.stanza; if not st.is_stanza(stanza) then @@ -46,6 +48,11 @@ if stanza:get_child("encryption", "urn:xmpp:eme:0") then return true; end + for important in important_payloads do + if stanza:find(important) then + return true; + end + end return false; end return true;