-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: Use published federation package #37046
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
Changes from all commits
c45c0b8
4603785
d58ff2e
9bdaaaf
01220c2
73dd68a
aba0ed3
a7f8c73
04ffd84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,5 +60,4 @@ registration.yaml | |
| storybook-static | ||
| development/tempo-data/ | ||
|
|
||
| homeserver | ||
| .env | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,5 @@ | ||
| import 'reflect-metadata'; | ||
|
|
||
| import type { FileMessageType, PresenceState } from '@hs/core'; | ||
| import { ConfigService, createFederationContainer, getAllServices } from '@hs/federation-sdk'; | ||
| import type { HomeserverEventSignatures, HomeserverServices, FederationContainerOptions } from '@hs/federation-sdk'; | ||
| import type { EventID } from '@hs/room'; | ||
| import { type IFederationMatrixService, ServiceClass, Settings } from '@rocket.chat/core-services'; | ||
| import { | ||
| isDeletedMessage, | ||
|
|
@@ -15,6 +11,15 @@ import { | |
| } from '@rocket.chat/core-typings'; | ||
| import type { MessageQuoteAttachment, IMessage, IRoom, IUser, IRoomNativeFederated } from '@rocket.chat/core-typings'; | ||
| import { Emitter } from '@rocket.chat/emitter'; | ||
| import { ConfigService, createFederationContainer, getAllServices } from '@rocket.chat/federation-sdk'; | ||
| import type { | ||
| EventID, | ||
| HomeserverEventSignatures, | ||
| HomeserverServices, | ||
| FederationContainerOptions, | ||
| FileMessageType, | ||
| PresenceState, | ||
| } from '@rocket.chat/federation-sdk'; | ||
| import { Router } from '@rocket.chat/http-router'; | ||
| import { Logger } from '@rocket.chat/logger'; | ||
| import { Users, Subscriptions, Messages, Rooms } from '@rocket.chat/models'; | ||
|
|
@@ -43,7 +48,7 @@ export const fileTypes: Record<string, FileMessageType> = { | |
| file: 'm.file', | ||
| }; | ||
|
|
||
| export { generateEd25519RandomSecretKey } from '@hs/crypto'; | ||
| export { generateEd25519RandomSecretKey } from '@rocket.chat/federation-sdk'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify exported symbol availability in the new SDK Please confirm 🌐 Web query: 💡 Result: I couldn't find any export named generateEd25519RandomSecretKey in @rocket.chat/federation-sdk@0.1.3. (I searched the Rocket.Chat federation repositories and npm-related package listings and found no reference to that function.) [1][2] If you want, I can fetch the package tarball (or a specific file path in that version) and inspect its exports directly. Fix broken re-export — missing symbol in SDK generateEd25519RandomSecretKey is not exported by @rocket.chat/federation-sdk@0.1.3; the re-export in ee/packages/federation-matrix/src/FederationMatrix.ts:51 will fail. Replace the import with the actual exported symbol from the SDK, vendor/implement the function locally, or pin/revert to an SDK version that provides it. 🤖 Prompt for AI Agents |
||
|
|
||
| export class FederationMatrix extends ServiceClass implements IFederationMatrixService { | ||
| protected name = 'federation-matrix'; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| import type { HomeserverServices } from '@hs/federation-sdk'; | ||
| import type { RoomVersion } from '@hs/room'; | ||
| import type { HomeserverServices, RoomVersion } from '@rocket.chat/federation-sdk'; | ||
| import { Router } from '@rocket.chat/http-router'; | ||
| import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv'; | ||
|
|
||
|
|
@@ -149,7 +148,7 @@ | |
| required: ['roomId', 'userId'], | ||
| }; | ||
|
|
||
| // @ts-ignore | ||
|
Check warning on line 151 in ee/packages/federation-matrix/src/api/_matrix/profiles.ts
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const isMakeJoinParamsProps = ajv.compile(MakeJoinParamsSchema); | ||
|
|
||
|
|
@@ -167,7 +166,7 @@ | |
| }, | ||
| }; | ||
|
|
||
| // @ts-ignore | ||
|
Check warning on line 169 in ee/packages/federation-matrix/src/api/_matrix/profiles.ts
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const isMakeJoinQueryProps = ajv.compile(MakeJoinQuerySchema); | ||
|
|
||
|
|
@@ -253,7 +252,7 @@ | |
| required: ['room_version', 'event'], | ||
| }; | ||
|
|
||
| // @ts-ignore | ||
|
Check warning on line 255 in ee/packages/federation-matrix/src/api/_matrix/profiles.ts
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const isMakeJoinResponseProps = ajv.compile(MakeJoinResponseSchema); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| import type { HomeserverServices } from '@hs/federation-sdk'; | ||
| import type { EventID } from '@hs/room'; | ||
| import type { HomeserverServices, EventID } from '@rocket.chat/federation-sdk'; | ||
| import { Router } from '@rocket.chat/http-router'; | ||
| import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv'; | ||
|
|
||
|
|
@@ -47,7 +46,7 @@ | |
| required: ['roomId', 'stateKey'], | ||
| }; | ||
|
|
||
| // @ts-ignore | ||
|
Check warning on line 49 in ee/packages/federation-matrix/src/api/_matrix/send-join.ts
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const isSendJoinParamsProps = ajv.compile(SendJoinParamsSchema); | ||
|
|
||
|
|
@@ -184,7 +183,7 @@ | |
| ], | ||
| }; | ||
|
|
||
| // @ts-ignore | ||
|
Check warning on line 186 in ee/packages/federation-matrix/src/api/_matrix/send-join.ts
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const isSendJoinEventProps = ajv.compile(SendJoinEventSchema); | ||
|
|
||
|
|
@@ -218,7 +217,7 @@ | |
| required: ['event', 'state', 'auth_chain', 'members_omitted', 'origin'], | ||
| }; | ||
|
|
||
| // @ts-ignore | ||
|
Check warning on line 220 in ee/packages/federation-matrix/src/api/_matrix/send-join.ts
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| const isSendJoinResponseProps = ajv.compile(SendJoinResponseSchema); | ||
|
|
||
|
|
||
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.
🧩 Analysis chain
Verify DI setup and TS typings for the new deps (tsyringe, tweetnacl).
Run this script to verify usage, config, and typing needs:
🏁 Script executed:
Length of output: 97
🏁 Script executed:
Length of output: 49309
Action required — fix DI import, TS decorator settings, and typings for tsyringe / tweetnacl
import 'reflect-metadata'found in apps/meteor scans — add it at the top of app entrypoints (apps/meteor server & client entrypoints) and in the entrypoints of packages that declare tsyringe (ee/apps/federation-service, ee/packages/federation-matrix) before any decorator/DI usage.🤖 Prompt for AI Agents