#1250 mod_csi_simple: insufficient definition of "important"
The set of rules implemented by mod_csi_simple to immediately send stanzas to an "inactive" client is very short.
It's great that it includes presence subscriptions, however it is missing at least:
* sent/received Carbons (sent = important, received to be treated like normal message)
* Chat Markers and potentially 'active' CSNs from own account (for removing notifications)
* various encrypted message types (OMEMO, XEP27, OX, ...)
Nice to have:
* groupchat self-presence and subject (to complete a join)
* MUC messages from member-only MUCs ("barbeque" style)
* MUC message containing a mention (any type of MUC)
https://hg.prosody.im/prosody-modules/file/75930e4c2478/mod_csi_battery_saver/mod_csi_battery_saver.lua#l101 provides a nice list of rules created over the time that should be taken over.
P.S: there was a user report about MUC joins not working during CSI-inactive. Maybe this is caused by csi_simple not having an "important" flag on MUC subjects.
P.P.S: a nice test-case for your test framework would be:
- client connects
- client sets CSI inactive
- client joins a MUC
- MUC join is completed ~immediately
So, based on the first comment, I've got a patch that does this:
carbons:sent -> important (including any kind of chat markers/states)
carbons:received -> extract payload and apply following rules to it
subject -> important
XEP-0380 EME -> important
Identifying the kind of MUC is not something I know if it can be done in a state-less way, so it will have to wait to a future version.
EME and having a body should cover most encryption methods AFAIK