-
Notifications
You must be signed in to change notification settings - Fork 13k
fix(federation): set room topic on creation of federated rooms #38264
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! 🎉 |
|
WalkthroughThe changes add functionality to set a room topic on Matrix-based federated rooms during room creation. After successfully creating a Matrix room, if a topic is provided, the code invokes Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 @@
## develop #38264 +/- ##
========================================
Coverage 70.70% 70.71%
========================================
Files 3139 3139
Lines 108744 108744
Branches 19560 19601 +41
========================================
+ Hits 76887 76897 +10
+ Misses 29856 29848 -8
+ Partials 2001 1999 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
1 issue found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="ee/packages/federation-matrix/tests/end-to-end/room.spec.ts">
<violation number="1" location="ee/packages/federation-matrix/tests/end-to-end/room.spec.ts:763">
P2: Guard the `topic` event before calling `getContent()` (or assert it’s defined) so the test fails cleanly and doesn’t throw when the state hasn’t synced yet.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| const [topic] = hs1Room1.getLiveTimeline().getState(EventTimeline.FORWARDS)?.getStateEvents('m.room.topic') || []; | ||
|
|
||
| expect(topic.getContent().topic).toBe(channelTopic); |
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.
P2: Guard the topic event before calling getContent() (or assert it’s defined) so the test fails cleanly and doesn’t throw when the state hasn’t synced yet.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At ee/packages/federation-matrix/tests/end-to-end/room.spec.ts, line 763:
<comment>Guard the `topic` event before calling `getContent()` (or assert it’s defined) so the test fails cleanly and doesn’t throw when the state hasn’t synced yet.</comment>
<file context>
@@ -713,6 +715,102 @@ import { SynapseClient } from '../helper/synapse-client';
+
+ const [topic] = hs1Room1.getLiveTimeline().getState(EventTimeline.FORWARDS)?.getStateEvents('m.room.topic') || [];
+
+ expect(topic.getContent().topic).toBe(channelTopic);
+ });
+ });
</file context>
Proposed changes (including videos or screenshots)
Issue(s)
FEDCORE-5
Steps to test or reproduce
Further comments
Summary by CodeRabbit
Release Notes
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.