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

Ensure e2e messages trigger unread counts and push notifs. #2256

Closed
Tracked by #3363
ara4n opened this issue Sep 17, 2016 · 7 comments
Closed
Tracked by #3363

Ensure e2e messages trigger unread counts and push notifs. #2256

ara4n opened this issue Sep 17, 2016 · 7 comments
Labels
A-E2EE P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Enhancement

Comments

@ara4n
Copy link
Member

ara4n commented Sep 17, 2016

No description provided.

@ara4n ara4n added P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-E2EE feature labels Sep 17, 2016
@ara4n
Copy link
Member Author

ara4n commented Sep 17, 2016

Have put a suggested PR at matrix-org/synapse#1131

@ara4n
Copy link
Member Author

ara4n commented Sep 17, 2016

It will presumably need clientside support as well to let clients override these new base rules, however.

Alternatively, @dbkr, should this be being done entirely with clientside rules in the first place (with no defaults from the server)?

@richvdh
Copy link
Member

richvdh commented Nov 22, 2016

Currently the badge counts are calculated by the server, because calculating them correctly requires having scrollback all the way back to the read-marker.

Solutions might be:

@richvdh
Copy link
Member

richvdh commented Nov 22, 2016

Initial suggestion is that we would like to avoid putting mentions in cleartext, and instead have the client back-paginate at least as far as the read-receipt in order to calculate badge counts on the client side.

@richvdh
Copy link
Member

richvdh commented Nov 23, 2016

We had a longer discussion about this.

There are a number of options:

  1. Revisit the way notifications work. Perhaps we don't actually need to support mentions and keywords in e2e rooms - is it sufficient to just get a notification on each event?

    Maybe... my problem is partly that the internal rooms I care about (E2E internal, particularly) end up somewhat indistinguishable from the high-traffic public rooms (Matrix HQ); a "high-priority" flag which makes the room turn red as if there was a mention might help me here. Still, I think really I want to get a special notification when someone mentions me.

  2. Have the sender send a list of users to bing in a separate field in the event, and send it in the clear.

    The disadvantages are (a) a privacy leak, and (b) it won't help with custom keywords.

    The privacy leak is mitigated by the fact that the room membership list is already in the clear, as are read-receipts and event senders (you can infer pretty strongly who was mentioned in a message by who is first to read and reply to it). We could also make the choice between leaking mentions and working notifications a user choice via a "security level" slider.

    We might also need to consider what UX could make it clear that custom keywords won't work in E2E rooms.

  3. Similar to 2, but have the sender send the recipient a "notification" in a to-device event instead.

    This might help mitigate the privacy leak, except not really because the participating HSes can still see the to-device events being sent. It would also add even more pain to the process of sending an e2e event, which is painful enough already.

  4. Implement all notifications and badge counts on the client side, by having clients back-paginate up to the read-receipt.

    This would be the only way to get notifications to work properly for custom keywords as well as mentions. It would, however, be quite difficult to implement, as it doesn't fit well with the js-sdk's current model. We would need to back-paginate each room in the background looking for keywords; meanwhile events would continue to arrive, which would be tricky to handle without races. The user might read a room on another device, so every time a self-read-receipt arrived, we would need to restart this process.

    This might also cause a significant battery drain on mobile devices, but we're already effectively doing this on android and it doesn't seem to be a particular problem for me.

The viable options seem to be 2 and 4. Neither is ideal. One thing that did become obvious during discussion was that 4 (do notifications on the client) would be a lot of work, while 2 (send a list of mentions in the clear) could solve most of the problem, and the work to support special treatment of mentions (to avoid trying to infer it from a dodgy display-name match) is something we probably want to do anyway.

@aaronraimist
Copy link
Collaborator

They do now

@jryans
Copy link
Collaborator

jryans commented Aug 29, 2019

Yes, I think it's safe to close this. If there are issues with the current implementation, let's open separate issues to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Enhancement
Projects
None yet
Development

No branches or pull requests

4 participants