# HG changeset patch # User tmolitor # Date 1587276909 -7200 # Node ID 19c5bfc3a2416e8a815b6808b9b80755fd4524cd # Parent 6bf362008052b9ee4a078e888edee9815e2ecc56 mod_csi_battery_saver: Add Jingle incoming call messages to important, thanks to Wiktor Kwapisiewicz diff -r 6bf362008052 -r 19c5bfc3a241 mod_csi_battery_saver/mod_csi_battery_saver.lua --- a/mod_csi_battery_saver/mod_csi_battery_saver.lua Sun Apr 19 08:12:21 2020 +0200 +++ b/mod_csi_battery_saver/mod_csi_battery_saver.lua Sun Apr 19 08:15:09 2020 +0200 @@ -97,12 +97,16 @@ if carbon then stanza = carbon; end local st_type = stanza.attr.type; + -- headline message are always not important if st_type == "headline" then return false; end -- chat markers (XEP-0333) are important, too, because some clients use them to update their notifications if stanza:child_with_ns("urn:xmpp:chat-markers:0") then return true; end; + -- XEP-0353: Jingle Message Initiation incoming call messages + if stanza:child_with_ns("urn:xmpp:jingle-message:0") then return true; end + -- carbon copied outgoing messages are important (some clients update their notifications upon receiving those) --> don't return false here --if carbon and stanza_direction == "out" then return false; end