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

Handle self read receipts for fixing e2e notification counts #974

Merged
merged 1 commit into from
Jul 3, 2019

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#9421

This also adds a context to the ReEmitter so we have access to the Room at the time of read receipt. Without this, we have to bind handlers to every encrypted room (which is tedious to maintain) or figure out which room $something belong to (CPU intensive).

Fixes element-hq/element-web#9421

This also adds a context to the ReEmitter so we have access to the Room at the time of read receipt. Without this, we have to bind handlers to every encrypted room (which is tedious to maintain) or figure out which room `$something` belong to (CPU intensive).
@turt2live turt2live requested a review from a team July 2, 2019 19:14
@bwindels bwindels requested review from bwindels and removed request for a team July 3, 2019 09:05
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a good thing to solve, thanks! The code looks like it would work, but not sure the constructor of the client is where I'd expect this to be though when looking for how this works... did you consider putting it in room? You might be able to avoid using the event system (and needing to adjust it) in that case.

@turt2live
Copy link
Member Author

Putting it in the room pulls it away from the existing code which handles this, and we'd have upwards of a few hundred listeners.

Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting it in the room pulls it away from the existing code which handles this, and we'd have upwards of a few hundred listeners.

Ok, not sure why you'd need a listener at all if the object emitting and listening are one and the same, but keeping related code together is good 👍

@turt2live turt2live merged commit 2cdbc9f into develop Jul 3, 2019
@turt2live turt2live deleted the travis/e2e-self-notif branch July 3, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e notification counts don't go down when reading them on other devices
2 participants