feat: add support to encrypted messages#270
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds support for m.room.encrypted across federation SDK and room schemas: new encrypted event emission in staging area, inclusion in auth-event discovery, expanded HomeserverEventSignatures with a localized RelatesTo type, and new timeline/encrypted content schemas. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor HS as Homeserver
participant SA as StagingAreaService
participant ER as EventRepository
participant EB as EventBus
rect #F2F8FF
note over HS: Incoming room event
HS->>SA: m.room.message / m.room.encrypted
end
alt plaintext message
SA->>ER: fetch auth-related events (message)
ER-->>SA: auth events
SA-->>EB: emit homeserver.matrix.message (content, m.relates_to)
else encrypted message
SA->>ER: fetch auth-related events (encrypted)
ER-->>SA: auth events (includes encrypted)
SA-->>EB: emit homeserver.matrix.encrypted (content, m.relates_to)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
📜 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #270 +/- ##
==========================================
- Coverage 62.34% 60.31% -2.04%
==========================================
Files 67 67
Lines 6393 6672 +279
==========================================
+ Hits 3986 4024 +38
- Misses 2407 2648 +241 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
packages/federation-sdk/src/index.ts(3 hunks)packages/federation-sdk/src/repositories/event.repository.ts(1 hunks)packages/federation-sdk/src/services/staging-area.service.ts(1 hunks)packages/room/src/types/v3-11.ts(5 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
packages/federation-sdk/src/services/staging-area.service.ts (4)
packages/room/src/manager/event-wrapper.ts (2)
event(128-137)roomId(100-102)packages/room/src/manager/v3.ts (1)
eventId(17-29)packages/federation-sdk/src/index.ts (1)
EventID(27-27)packages/room/src/types/_common.ts (1)
EventID(8-8)
packages/federation-sdk/src/index.ts (1)
packages/room/src/types/_common.ts (2)
EventID(8-8)PduForType(26-26)
https://rocketchat.atlassian.net/browse/FDR-195
Relates to RocketChat/Rocket.Chat#37191
Summary by CodeRabbit
New Features
Refactor