Conversation
WalkthroughInviteService.inviteUserToRoom now returns a payload including event_id, room_id, and a typed event created via PersistentEventFactory.createFromRawEvent based on the room’s version. Both early-return paths populate the new event field. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller
participant InviteService
participant PersistentEventFactory as EventFactory
participant RoomStore as Room Version
Caller->>InviteService: inviteUserToRoom(userId, roomId, sender, isDirectMessage?)
InviteService->>RoomStore: getRoomVersion(roomId)
RoomStore-->>InviteService: roomVersion
Note over InviteService: Build raw m.room.member invite event
InviteService->>EventFactory: createFromRawEvent(rawEvent, roomVersion)
EventFactory-->>InviteService: PersistentEvent
InviteService-->>Caller: { event_id, room_id, event }
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests❌ Error creating Unit Test PR.
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)packages/federation-sdk/src/services/invite.service.ts (2)
🔇 Additional comments (3)
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 |
07e8676 to
9e25d90
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #241 +/- ##
=======================================
Coverage 81.86% 81.86%
=======================================
Files 63 63
Lines 4709 4709
=======================================
Hits 3855 3855
Misses 854 854 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
Summary by CodeRabbit
New Features
Refactor