The purpose of MSC4028 is to be able to support on mobile clients the "mentions-and-keywords-only" room notification setting in encrypted rooms.
This MSC adds a new “server-default" override push rule (.m.rule.encrypted_event) in order to force the server to push all encrypted events to the registered client except for muted room. This impacts the unread notification counts sent by the server in the sync responses. Indeed these counts will not be null anymore for encrypted rooms configured in "mentions-and-keywords-only" mode.
I list here the 2 options to support this new MSC in Element-iOS:
option A: We do the minimum, which means we don't fix/support the "mentions-and-keywords-only" room notification setting in encrypted rooms. These rooms will still be considered as "muted" locally.
We have to ignore all the potential pushes received for an encrypted room configured in "mentions-and-keywords-only" mode (They are locally muted). During my tests, I observed that each additional push, triggered by this new push rule, was displayed by the current Element-iOS implementation, which is a bug (only the mentions and keywords should be notified if the push rules were applied correctly locally). This bug should be fixed for option B. For the option A we can ignore all pushed by default without fixing the bug.
About unread notification counts, the current implementation displays a badge for a room as soon as the count is not null. This is what we have to change for the encrypted rooms when they are configured in "mentions-and-keywords-only" mode
-> Do not display badge on "mentions-and-keywords-only" encrypted rooms even if the received unread count is not null (They are locally muted).
-> Do not count these rooms in the global unread room counter (application badge) too
Like in Element-Android or Element-Web, no notification should be displayed if the decryption failed for a pushed encrypted event.
option B: We decide to support the "mentions-and-keywords-only" room notification setting in encrypted rooms. We have then to fix the following points:
Fix the push handling by applying correctly the push rules on decrypted events. The purpose is to extract mentions and keywords from all the notified encrypted events (for "mentions-and-keywords-only" rooms).
Like in Element-Android or Element-Web, no notification should be displayed if the decryption failed for a pushed encrypted event.
Restore the possibility to display/select the "mentions & keywords only" notification setting for an encrypted room.
As soon as the new rule .m.rule.encrypted_event is present and enabled in the account push rules set, the clients have to track unread notifications themselves in encrypted rooms. Indeed the unread notification counts received from the server will be increased for each encrypted event, so the client should not display directly these counts. We should then implement the algorithm described in the MSC4028 proposal here. We may decide to check only if there is or not unread notifications in the room without counting them. The client would display a dot to highlight rooms with unread notifications (instead of a badge with a count).
Description
The purpose of MSC4028 is to be able to support on mobile clients the "mentions-and-keywords-only" room notification setting in encrypted rooms.
This MSC adds a new “server-default" override push rule (
.m.rule.encrypted_event
) in order to force the server to push all encrypted events to the registered client except for muted room. This impacts the unread notification counts sent by the server in the sync responses. Indeed these counts will not be null anymore for encrypted rooms configured in "mentions-and-keywords-only" mode.I list here the 2 options to support this new MSC in Element-iOS:
option A: We do the minimum, which means we don't fix/support the "mentions-and-keywords-only" room notification setting in encrypted rooms. These rooms will still be considered as "muted" locally.
We have to ignore all the potential pushes received for an encrypted room configured in "mentions-and-keywords-only" mode (They are locally muted). During my tests, I observed that each additional push, triggered by this new push rule, was displayed by the current Element-iOS implementation, which is a bug (only the mentions and keywords should be notified if the push rules were applied correctly locally). This bug should be fixed for option B. For the option A we can ignore all pushed by default without fixing the bug.
About unread notification counts, the current implementation displays a badge for a room as soon as the count is not null. This is what we have to change for the encrypted rooms when they are configured in "mentions-and-keywords-only" mode -> Do not display badge on "mentions-and-keywords-only" encrypted rooms even if the received unread count is not null (They are locally muted). -> Do not count these rooms in the global unread room counter (application badge) too
Like in Element-Android or Element-Web, no notification should be displayed if the decryption failed for a pushed encrypted event.
option B: We decide to support the "mentions-and-keywords-only" room notification setting in encrypted rooms. We have then to fix the following points:
Fix the push handling by applying correctly the push rules on decrypted events. The purpose is to extract mentions and keywords from all the notified encrypted events (for "mentions-and-keywords-only" rooms).
Like in Element-Android or Element-Web, no notification should be displayed if the decryption failed for a pushed encrypted event.
Restore the possibility to display/select the "mentions & keywords only" notification setting for an encrypted room.
As soon as the new rule
.m.rule.encrypted_event
is present and enabled in the account push rules set, the clients have to track unread notifications themselves in encrypted rooms. Indeed the unread notification counts received from the server will be increased for each encrypted event, so the client should not display directly these counts. We should then implement the algorithm described in the MSC4028 proposal here. We may decide to check only if there is or not unread notifications in the room without counting them. The client would display a dot to highlight rooms with unread notifications (instead of a badge with a count).