element-hq / element-hq/element-web

Notification 'red' badge count is flawed in E2EE rooms

Open
#17,223 6 comments 1 reaction 0 assignees View on GitHub
A-E2EE A-Notifications O-Frequent S-Major T-Defect Z-GetYourUpdates
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

You can only correctly calculate badge counts for mentions & keyword push rules if you decrypt every message in an E2EE room on the client. Currently if there is a gappy sync (due to the app being offline overnight, or the client failing to keep up with the server) then messages deliberately get dropped. Therefore the 'red' badge count for missed notifications is wrong (and the NotifPanel is wrong) whenever the app awakes in the morning - which is when you want the badge counts to be the most correct.

Instead we should spider the E2EE rooms in the background in order to calculate the right notification count. Luckily we have the code to do this already for Seshat - but we need to actually hook it up on both Web & Desktop so that it triggers badge count calculations as it spiders, so we at last get the correct badge counts.

cc @manuroe and @bmarty for iOS & Android, as the same problem exists there (but is less pronounced given gappy syncs are somewhat less common given people tend not to turn off or disconnect their phones as often as they do their laptops).

cc @gsouquet as this overlaps somewhat with his decrypt-on-demand work in https://github.com/matrix-org/matrix-js-sdk/pull/1684

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.