-
Notifications
You must be signed in to change notification settings - Fork 13.1k
fix(federation): thread not working #37188
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the federation matrix service where thread functionality was not working properly due to improper handling of optional thread event IDs.
- Added conditional parsing for
latestThreadEventIdto handle cases where it may be undefined - Prevents runtime errors when processing thread messages without a latest thread event ID
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WalkthroughThe change updates FederationMatrix to pass latestThreadEventId to Matrix’s sendThreadMessage only when defined, using eventIdSchema.parse for validation. If not present, undefined is passed. No public API signatures were altered. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant FM as FederationMatrix
participant MX as MatrixClient
C->>FM: send threaded reply (message, latestThreadEventId?)
alt latestThreadEventId defined
FM->>FM: validate with eventIdSchema.parse(id)
FM->>MX: sendThreadMessage(message, parsedId)
else no latestThreadEventId
FM->>MX: sendThreadMessage(message, undefined)
end
MX-->>FM: ack / result
FM-->>C: result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-7.11.0 #37188 +/- ##
==================================================
- Coverage 67.45% 67.43% -0.02%
==================================================
Files 3329 3329
Lines 113381 113381
Branches 20573 20573
==================================================
- Hits 76477 76462 -15
- Misses 34306 34318 +12
- Partials 2598 2601 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit