Fix /sync failing when MSC4354 Sticky Events are enabled and the sync request filters out Ephemeral Data Units (EDUs).#19787
Merged
Conversation
…e filtered out
/sync failing when [MSC4354 Sticky Events](https://github.com/matrix-org/matrix-spec-proposals/pull/4354) are enabled and the sync request filters out Ephemeral Data Units (EDUs)./sync failing when MSC4354 Sticky Events are enabled and the sync request filters out Ephemeral Data Units (EDUs).
MadLittleMods
approved these changes
May 15, 2026
| sticky_by_room: dict[str, list[str]] = {} | ||
| if self.hs_config.experimental.msc4354_enabled: | ||
| now_token, sticky_by_room = await self.sticky_events_by_room( | ||
| sync_result_builder, now_token, since_token |
Contributor
There was a problem hiding this comment.
To point this out more clearly, the problem is that now_token can be undefined when it's used here.
| @@ -0,0 +1 @@ | |||
| Fix `/sync` failing when [MSC4354 Sticky Events](https://github.com/matrix-org/matrix-spec-proposals/pull/4354) are enabled and the sync request filters out Ephemeral Data Units (EDUs). No newline at end of file | |||
Contributor
Author
There was a problem hiding this comment.
Nicely spotted. fwiw I edited the description to add a second Fixes line as it seems GH doesn't pick up comma-separated ones.
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.
Fixes: #19779
Fixes: #19618
See also: #19786 (which would have caught this, but currently has too many findings to enable)
Fix UnboundLocalError when MSC4354 is enabled in sync and all EDUs are filtered out