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) #25668

Open
giomfo opened this issue Jun 27, 2023 · 2 comments
Open

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

giomfo opened this issue Jun 27, 2023 · 2 comments

Comments

@giomfo
Copy link
Member

giomfo commented Jun 27, 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.

I create this issue in order to list and check the potential impacts of this MSC on the current web client.
When the new push rule .m.rule.encrypted_event will be present and enabled in the account push rules set, the web client may be impacted by the 2 following changes:

  • The unread notification counts sent by the server in the sync responses will increase more frequently. Indeed these counts are increased for each push. For example the counts will not be null anymore for encrypted rooms configured in "mentions-and-keywords-only" mode.
  • The existing endpoint GET /_matrix/client/v3/notifications will return more encrypted events than it used to. Indeed all of the encrypted events will match with the new push rule (except for muted rooms).
@giomfo giomfo self-assigned this Jun 27, 2023
@t3chguy
Copy link
Member

t3chguy commented Jun 27, 2023

The unread notification counts sent by the server in the sync responses will increase more frequently. Indeed these counts are increased for each push. For example the counts will not be null anymore for encrypted rooms configured in "mentions-and-keywords-only" mode.

This will be fine, js-sdk already treats the notification counts on encrypted rooms as a maximal bound rather than the actual value, decreasing as it applies push rules locally

The existing endpoint GET /_matrix/client/v3/notifications will return more encrypted events than it used to. Indeed all of the encrypted events will match with the new push rule (except for muted rooms).

Great, sounds like that will fix #6874

@giomfo
Copy link
Member Author

giomfo commented Jun 27, 2023

According to my tests applied on the existing Element-Web client, no change is required on the web client before introducing the new push rule described in MSC4028.

Indeed the current web client will not be impacted by the 2 changes mentioned in the description:

  • The web client seems completely ignore the notification counts for encrypted rooms from the sync. It computes its own counts. This code confirms this assumption, but this may be double checked by the web dev team.
  • The endpoint GET /_matrix/client/v3/notifications is currently used to fill the notification left panel with the request parameter only=highlight. This parameter prevents the web-client from receiving for the moment the additional encrypted events because the new push rule doesn't have the highlight tweak set.

The next step for this issue is to decide/plan which kind of changes based on this MSC4028 we want for the web client.
I would suggest these 2 options:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants