Send 0 notification counts unconditionally in sync v3 - #564
Open
ruka-hamanasu wants to merge 2 commits into
Open
Send 0 notification counts unconditionally in sync v3#564ruka-hamanasu wants to merge 2 commits into
ruka-hamanasu wants to merge 2 commits into
Conversation
added 2 commits
August 28, 2026 10:24
Previously, if a client updated its read receipt in the same sync round in which a non-notifying timeline event (reactions, edits) occurs, Tuwunel was not emitting a notification count of 0 (or any notification count). Because future syncs without further notifications would keep the notification count as 0, that means that any client relying only on seeing the 0 notification count (for example FluffyChat) would never reset its notification count and the room would remain marked as unread. This PR includes both a shell script to reproduce the problem (see the instructions contained within) and the fix, with unit tests.
Author
|
CI is failing on changes I did not make, so I'm going to leave those failures for the maintainers to decide about. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Previously, if a client updated its read receipt in the same sync round in which a non-notifying timeline event (reactions, edits) occurs, Tuwunel was not emitting a notification count of 0 (or any notification count). Because future syncs without further notifications would keep the notification count as 0, that means that any client relying only on seeing the 0 notification count (for example FluffyChat) would never reset its notification count and the room would remain marked as unread.
This PR includes both a shell script to reproduce the problem (see the instructions contained within) and the fix, with unit tests.
The code here is currently running on my homeserver (matrix.agiadn.org) along with #565, and along with some FluffyChat fixes (I'll link that PR when I put it up), FluffyChat is now marking rooms as read in all circumstances.
Checklist
cargo fmtand satisfies clippy andrustc lints; any allowed lint is justified by an obvious reason or a
comment.
are noted in the description above.
src/core/config/mod.rsdoccomments and the regenerated
tuwunel-example.tomlis committed.docs/.and my conduct is in line with the Contributor's Covenant and
Tuwunel's Code of Conduct.