-
Notifications
You must be signed in to change notification settings - Fork 13k
fix(federation): unset reactions not working from remote #37129
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 not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Caution Review failedThe pull request is closed. WalkthroughThe change updates reaction redaction handling to read event properties from a nested event object. It now uses reactionEvent.event.type and reactionEvent.event.content['m.relates_to'] instead of accessing type and content at the top level. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor MatrixServer as Matrix Server
participant FederationHandler as Federation Handler
participant ReactionEvent as Reaction Event
MatrixServer->>FederationHandler: Redaction event received
FederationHandler->>ReactionEvent: Inspect event
Note right of ReactionEvent: New: use event.type and event.content['m.relates_to']
alt Is reaction
FederationHandler->>FederationHandler: Extract m.relates_to from event.content
FederationHandler->>FederationHandler: Apply redaction logic
FederationHandler-->>MatrixServer: Ack redaction
else Not a reaction or missing content
FederationHandler->>FederationHandler: Skip or default handling
FederationHandler-->>MatrixServer: Ack without reaction-specific changes
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (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 |
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 incorrect property access in the reaction event handling code for the Matrix federation integration. The changes correct the path to access event type and content properties from a reaction event object.
- Fixed property access from
reactionEvent.typetoreactionEvent.event.type - Fixed property access from
reactionEvent.contenttoreactionEvent.event.content
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-7.11.0 #37129 +/- ##
===============================================
Coverage 67.45% 67.45%
===============================================
Files 3329 3329
Lines 113387 113387
Branches 20579 20584 +5
===============================================
+ Hits 76488 76490 +2
+ Misses 34299 34294 -5
- Partials 2600 2603 +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