Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MSC4028 (Push all encrypted events except for muted rooms) #7607

Open
giomfo opened this issue Jun 23, 2023 · 1 comment
Open

Support MSC4028 (Push all encrypted events except for muted rooms) #7607

giomfo opened this issue Jun 23, 2023 · 1 comment
Labels
A-Notifications T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@giomfo
Copy link
Member

giomfo commented Jun 23, 2023

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).
@giomfo giomfo added T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements A-Notifications labels Jun 23, 2023
@giomfo
Copy link
Member Author

giomfo commented Jun 23, 2023

related to element-hq/element-android#8539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

No branches or pull requests

1 participant