Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/ci-code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ jobs:
swap-size-gb: 4

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: homeserver
path: /tmp/homeserver
- run: ln -s /tmp/homeserver ${{ github.workspace }}/homeserver

- name: Setup NodeJS
uses: ./.github/actions/setup-node
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@ jobs:
mongodb-replica-set: rs0

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: homeserver
path: /tmp/homeserver
- run: ln -s /tmp/homeserver ${{ github.workspace }}/homeserver

- name: Setup NodeJS
uses: ./.github/actions/setup-node
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/ci-test-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ jobs:
runs-on: ubuntu-24.04

name: Test Storybook

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: homeserver
path: /tmp/homeserver
- run: ln -s /tmp/homeserver ${{ github.workspace }}/homeserver

- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
Expand Down Expand Up @@ -59,4 +55,3 @@ jobs:
flags: unit
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}

5 changes: 0 additions & 5 deletions .github/workflows/ci-test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:
job_summary: true
comment_on_pr: false
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: homeserver
path: /tmp/homeserver
- run: ln -s /tmp/homeserver ${{ github.workspace }}/homeserver

- name: Setup NodeJS
uses: ./.github/actions/setup-node
Expand Down
58 changes: 3 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,42 +133,9 @@ jobs:
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"denoVersion\": \"${{ needs.release-versions.outputs.deno-version }}\", \"compatibleMongoVersions\": [\"5.0\", \"6.0\", \"7.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"draft\", \"draftAs\": \"$RC_RELEASE\"}" \
https://releases.rocket.chat/update

build-homeserver:
name: 📦 Build Homeserver
needs: [release-versions]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
repository: RocketChat/homeserver
path: homeserver

- uses: actions/cache@v4
id: cache-homeserver
name: cache homeserver
with:
path: /tmp/homeserver
key: homeserver-${{ hashFiles('homeserver/.git/refs/heads/main') }}

- uses: oven-sh/setup-bun@v2
if: steps.cache-homeserver.outputs.cache-hit != 'true'
- run: |
cd homeserver
bun install
bun run build
bun run bundle:sdk
rm -rf .git
cp -r ../homeserver /tmp/homeserver
if: steps.cache-homeserver.outputs.cache-hit != 'true'

- uses: actions/upload-artifact@v4
with:
name: homeserver
path: /tmp/homeserver

packages-build:
name: 📦 Build Packages
needs: [release-versions, notify-draft-services, build-homeserver]
needs: [release-versions, notify-draft-services]
runs-on: ubuntu-24.04
steps:
- name: Github Info
Expand All @@ -188,13 +155,6 @@ jobs:

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: homeserver
path: /tmp/homeserver

- run: ln -s /tmp/homeserver ${{ github.workspace }}/homeserver

- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
Expand Down Expand Up @@ -228,7 +188,7 @@ jobs:

build:
name: 📦 Meteor Build - coverage
needs: [release-versions, packages-build, build-homeserver]
needs: [release-versions, packages-build]
runs-on: ubuntu-24.04

steps:
Expand All @@ -250,12 +210,6 @@ jobs:

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: homeserver
path: /tmp/homeserver
- run: ln -s /tmp/homeserver ${{ github.workspace }}/homeserver

- uses: ./.github/actions/meteor-build
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
Expand Down Expand Up @@ -340,7 +294,7 @@ jobs:

build-gh-docker-coverage:
name: 🚢 Build Docker Images for Testing
needs: [build, release-versions, build-matrix-rust-bindings-for-alpine, build-homeserver]
needs: [build, release-versions, build-matrix-rust-bindings-for-alpine]
runs-on: ubuntu-24.04

env:
Expand All @@ -357,12 +311,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: homeserver
path: /tmp/homeserver
- run: ln -s /tmp/homeserver ${{ github.workspace }}/homeserver

# we only build and publish the actual docker images if not a PR from a fork
- uses: ./.github/actions/build-docker
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ registration.yaml
storybook-static
development/tempo-data/

homeserver
.env
2 changes: 2 additions & 0 deletions apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@
"swiper": "patch:swiper@npm%3A11.1.14#~/.yarn/patches/swiper-npm-11.1.14-8126fa478a.patch",
"textarea-caret": "^3.1.0",
"tinykeys": "^1.4.0",
"tsyringe": "^4.10.0",
"tweetnacl": "^1.0.3",
Comment on lines +454 to +455
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

Verify DI setup and TS typings for the new deps (tsyringe, tweetnacl).

  • Ensure reflect-metadata is imported before any tsyringe usage on both client and server entrypoints; the dependency exists (Line 439), but initialization import is required.
  • Confirm tsconfig enables experimentalDecorators and emitDecoratorMetadata for any project using tsyringe.
  • If tweetnacl is imported directly in TS code, add @types/tweetnacl to devDependencies (unless the SDK wraps usage and provides types).
  • Validate whether these are needed here vs. only in the packages that directly consume them, unless the SDK lists them as peerDependencies for the app.

Run this script to verify usage, config, and typing needs:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Search for direct imports of tsyringe and tweetnacl in TS files =="
rg -nP --type=ts --type=tsx -C2 "(from\s+['\"]tsyringe['\"]|from\s+['\"]tweetnacl['\"]|require\(['\"]tsyringe['\"]\)|require\(['\"]tweetnacl['\"]\))"

echo
echo "== Check that reflect-metadata is imported early in app entrypoints =="
rg -nP -C2 "import\s+['\"]reflect-metadata['\"]" apps/meteor/server/main.ts apps/meteor/client/main.ts || true

echo
echo "== Verify tsconfig decorator settings across workspaces =="
fd tsconfig.json | while read -r f; do
  echo "-- $f"
  jq '{file:$ENV.f, experimentalDecorators: .compilerOptions.experimentalDecorators, emitDecoratorMetadata: .compilerOptions.emitDecoratorMetadata}' "$f" 2>/dev/null || true
done

echo
echo "== Check for @types/tweetnacl presence =="
rg -nP '"@types/tweetnacl"\s*:' -C1 package.json **/package.json || true

echo
echo "== Inspect locked versions to avoid duplicates =="
rg -n "tsyringe@|tweetnacl@" yarn.lock -n -C1 || true

echo
echo "== Inspect federation SDK peerDependencies (if vendored in monorepo) =="
fd package.json | rg -nP -C3 '"name"\s*:\s*"@rocket\.chat/federation-sdk"|peerDependencies|dependencies' || true

Length of output: 97


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Search for direct imports of tsyringe and tweetnacl in .ts/.tsx files =="
rg -nP -g '**/*.ts' -g '**/*.tsx' -C2 "(from\s+['\"]tsyringe['\"]|from\s+['\"]tweetnacl['\"]|require\(['\"]tsyringe['\"]\)|require\(['\"]tweetnacl['\"]\))" || true

echo
echo "== Check that reflect-metadata is imported early in apps/meteor entrypoints =="
rg -nP "import\s+['\"]reflect-metadata['\"]" apps/meteor -S -n -C2 || true

echo
echo "== Verify tsconfig decorator settings across workspaces =="
find . -name tsconfig.json -not -path '*/node_modules/*' -print0 | while IFS= read -r -d '' f; do
  echo "-- $f"
  jq '{experimentalDecorators: .compilerOptions.experimentalDecorators, emitDecoratorMetadata: .compilerOptions.emitDecoratorMetadata}' "$f" 2>/dev/null || echo "  (invalid json or missing compilerOptions)"
done

echo
echo "== Check for @types/tweetnacl presence =="
rg -nP '"@types/tweetnacl"' -S || true

echo
echo "== Inspect yarn.lock for tsyringe@ or tweetnacl@ =="
if [ -f yarn.lock ]; then
  rg -n "tsyringe@|tweetnacl@" yarn.lock -n -C1 || true
else
  echo "yarn.lock not found"
fi

echo
echo "== Dump package.json name/peerDependencies/dependencies for review =="
find . -name package.json -not -path '*/node_modules/*' -print0 | while IFS= read -r -d '' f; do
  echo "-- $f"
  jq '{name: .name, peerDependencies: .peerDependencies, dependencies: .dependencies}' "$f" 2>/dev/null || echo "  (invalid json)"
done

Length of output: 49309


Action required — fix DI import, TS decorator settings, and typings for tsyringe / tweetnacl

  • reflect-metadata not imported early: no 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.
  • TS compiler flags inconsistent: many tsconfig.json files lack the required flags. Ensure any package that consumes tsyringe has compilerOptions.experimentalDecorators = true and compilerOptions.emitDecoratorMetadata = true. Example: ./ee/packages/federation-matrix/tsconfig.json has experimentalDecorators=true but emitDecoratorMetadata is missing — enable it. (./packages/apps-engine/tsconfig.json already has both set.)
  • Missing types for tweetnacl: no @types/tweetnacl found — if tweetnacl is imported from TypeScript, add @types/tweetnacl to the consuming package(s) devDependencies (apps/meteor, ee/apps/federation-service, ee/packages/federation-matrix) or to repo devDeps.
  • Duplicate versions in lockfile: yarn.lock contains tweetnacl@1.0.3 and 0.14.5 — dedupe/align versions or add resolutions to avoid multiple bundles.
  • Usage vs placement: scan found no direct .ts/.tsx imports of tsyringe/tweetnacl — confirm they’re actually used by the app level; if only SDKs/packages use them, move the deps to those packages or declare them as peerDependencies.
🤖 Prompt for AI Agents
In apps/meteor/package.json around lines 454-455, address DI and typing issues:
add import 'reflect-metadata' at the very top of the server and client
entrypoints (and at the top of any package entrypoints that use decorators or
tsyringe such as ee/apps/federation-service and ee/packages/federation-matrix)
before any decorator/DI usage; ensure each package that consumes tsyringe sets
compilerOptions.experimentalDecorators = true and
compilerOptions.emitDecoratorMetadata = true in its tsconfig.json (enable
emitDecoratorMetadata in ./ee/packages/federation-matrix/tsconfig.json); add
@types/tweetnacl to the devDependencies of consuming packages (apps/meteor,
ee/apps/federation-service, ee/packages/federation-matrix) or to repo devDeps if
preferred; resolve duplicate tweetnacl versions in yarn.lock by aligning
versions or adding a yarn/npm resolution so only one version is installed;
finally verify whether tsyringe/tweetnacl are used at app-level—if only
SDKs/packages use them move the dependencies into those packages or mark them as
peerDependencies at the app level.

"twilio": "^5.4.2",
"twit": "^2.2.11",
"typia": "~9.7.0",
Expand Down
4 changes: 3 additions & 1 deletion ee/apps/federation-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
},
"dependencies": {
"@hono/node-server": "^1.14.4",
"@hs/federation-sdk": "workspace:*",
"@rocket.chat/core-services": "workspace:^",
"@rocket.chat/core-typings": "workspace:*",
"@rocket.chat/emitter": "^0.31.25",
"@rocket.chat/federation-matrix": "workspace:^",
"@rocket.chat/federation-sdk": "0.1.4",
"@rocket.chat/http-router": "workspace:*",
"@rocket.chat/instance-status": "workspace:^",
"@rocket.chat/license": "workspace:^",
Expand All @@ -36,12 +36,14 @@
"polka": "^0.5.2",
"reflect-metadata": "^0.2.2",
"tsyringe": "^4.10.0",
"tweetnacl": "^1.0.3",
"zod": "^3.22.0"
},
"devDependencies": {
"@types/bun": "latest",
"@types/express": "^4.17.17",
"eslint": "~8.45.0",
"pino-pretty": "^7.6.1",
"typescript": "^5.3.0"
},
"keywords": [
Expand Down
8 changes: 5 additions & 3 deletions ee/packages/federation-matrix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"babel-jest": "~30.0.0",
"eslint": "~8.45.0",
"jest": "~30.0.0",
"pino-pretty": "^7.6.1",
"typescript": "~5.8.3"
},
"scripts": {
Expand All @@ -34,11 +35,10 @@
"extends": "../../../package.json"
},
"dependencies": {
"@hs/crypto": "workspace:^",
"@hs/federation-sdk": "workspace:^",
"@rocket.chat/core-services": "workspace:^",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/emitter": "^0.31.25",
"@rocket.chat/federation-sdk": "0.1.4",
"@rocket.chat/http-router": "workspace:^",
"@rocket.chat/license": "workspace:^",
"@rocket.chat/models": "workspace:^",
Expand All @@ -50,6 +50,8 @@
"mongodb": "6.10.0",
"pino": "8.21.0",
"reflect-metadata": "^0.2.2",
"sanitize-html": "^2.17.0"
"sanitize-html": "^2.17.0",
"tsyringe": "^4.10.0",
"tweetnacl": "^1.0.3"
}
}
15 changes: 10 additions & 5 deletions ee/packages/federation-matrix/src/FederationMatrix.ts
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,
Expand All @@ -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';
Expand Down Expand Up @@ -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';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

Verify exported symbol availability in the new SDK

Please confirm generateEd25519RandomSecretKey is exported by @rocket.chat/federation-sdk@0.1.3.


🌐 Web query:

Does @rocket.chat/federation-sdk@0.1.3 export a `generateEd25519RandomSecretKey` function?

💡 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
In ee/packages/federation-matrix/src/FederationMatrix.ts around line 51, the
file re-exports generateEd25519RandomSecretKey which is not exported by
@rocket.chat/federation-sdk@0.1.3 and will break the build; remove this broken
re-export and either (a) replace it with the actual symbol name exported by the
SDK (update the import to the correct exported function if the SDK provides it),
(b) vendor/implement a local generateEd25519RandomSecretKey in this package and
export that instead, or (c) pin/revert the dependency to a SDK version that
includes this symbol; ensure whichever approach you choose updates
imports/exports and tests accordingly so no unresolved export remains.


export class FederationMatrix extends ServiceClass implements IFederationMatrixService {
protected name = 'federation-matrix';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Router } from "@rocket.chat/http-router";
import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv';
import { createHash } from 'node:crypto';

import type { HomeserverServices } from '@hs/federation-sdk';
import type { HomeserverServices } from '@rocket.chat/federation-sdk';

const WellKnownServerResponseSchema = {
type: 'object',
Expand Down
10 changes: 8 additions & 2 deletions ee/packages/federation-matrix/src/api/_matrix/invite.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import type { HomeserverServices, RoomService, StateService } from '@hs/federation-sdk';
import type { PduMembershipEventContent, PersistentEventBase, RoomVersion } from '@hs/room';
import { Room } from '@rocket.chat/core-services';
import type { IUser, UserStatus } from '@rocket.chat/core-typings';
import type {
HomeserverServices,
RoomService,
StateService,
PduMembershipEventContent,
PersistentEventBase,
RoomVersion,
} from '@rocket.chat/federation-sdk';
import { Router } from '@rocket.chat/http-router';
import { Rooms, Users } from '@rocket.chat/models';
import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { HomeserverServices } from '@hs/federation-sdk';
import type { HomeserverServices } from '@rocket.chat/federation-sdk';
import { Router } from '@rocket.chat/http-router';
import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv';

Expand Down
2 changes: 1 addition & 1 deletion ee/packages/federation-matrix/src/api/_matrix/media.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import crypto from 'crypto';

import type { HomeserverServices } from '@hs/federation-sdk';
import type { IUpload } from '@rocket.chat/core-typings';
import type { HomeserverServices } from '@rocket.chat/federation-sdk';
import { Router } from '@rocket.chat/http-router';
import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv';

Expand Down
3 changes: 1 addition & 2 deletions ee/packages/federation-matrix/src/api/_matrix/profiles.ts
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';

Expand Down Expand Up @@ -149,7 +148,7 @@
required: ['roomId', 'userId'],
};

// @ts-ignore

Check warning on line 151 in ee/packages/federation-matrix/src/api/_matrix/profiles.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Do not use "@ts-ignore" because it alters compilation errors
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const isMakeJoinParamsProps = ajv.compile(MakeJoinParamsSchema);

Expand All @@ -167,7 +166,7 @@
},
};

// @ts-ignore

Check warning on line 169 in ee/packages/federation-matrix/src/api/_matrix/profiles.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Do not use "@ts-ignore" because it alters compilation errors
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const isMakeJoinQueryProps = ajv.compile(MakeJoinQuerySchema);

Expand Down Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Do not use "@ts-ignore" because it alters compilation errors
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const isMakeJoinResponseProps = ajv.compile(MakeJoinResponseSchema);

Expand Down
2 changes: 1 addition & 1 deletion ee/packages/federation-matrix/src/api/_matrix/rooms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { HomeserverServices } from '@hs/federation-sdk';
import type { HomeserverServices } from '@rocket.chat/federation-sdk';
import { Router } from '@rocket.chat/http-router';
import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv';

Expand Down
3 changes: 1 addition & 2 deletions ee/packages/federation-matrix/src/api/_matrix/send-join.ts
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';

Expand Down Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Do not use "@ts-ignore" because it alters compilation errors
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const isSendJoinParamsProps = ajv.compile(SendJoinParamsSchema);

Expand Down Expand Up @@ -184,7 +183,7 @@
],
};

// @ts-ignore

Check warning on line 186 in ee/packages/federation-matrix/src/api/_matrix/send-join.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Do not use "@ts-ignore" because it alters compilation errors
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const isSendJoinEventProps = ajv.compile(SendJoinEventSchema);

Expand Down Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Do not use "@ts-ignore" because it alters compilation errors
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const isSendJoinResponseProps = ajv.compile(SendJoinResponseSchema);

Expand Down
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';

Expand Down
2 changes: 1 addition & 1 deletion ee/packages/federation-matrix/src/api/_matrix/versions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { HomeserverServices } from '@hs/federation-sdk';
import type { HomeserverServices } from '@rocket.chat/federation-sdk';
import { Router } from '@rocket.chat/http-router';
import { ajv } from '@rocket.chat/rest-typings/dist/v1/Ajv';

Expand Down
5 changes: 2 additions & 3 deletions ee/packages/federation-matrix/src/api/middlewares.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { EventAuthorizationService } from '@hs/federation-sdk';
import { errCodes } from '@hs/federation-sdk';
import type { EventID } from '@hs/room';
import { errCodes } from '@rocket.chat/federation-sdk';
import type { EventAuthorizationService, EventID } from '@rocket.chat/federation-sdk';
import type { Context, Next } from 'hono';

export const canAccessMedia = (federationAuth: EventAuthorizationService) => async (c: Context, next: Next) => {
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/federation-matrix/src/events/edu.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { HomeserverEventSignatures } from '@hs/federation-sdk';
import { api } from '@rocket.chat/core-services';
import { UserStatus } from '@rocket.chat/core-typings';
import type { Emitter } from '@rocket.chat/emitter';
import type { HomeserverEventSignatures } from '@rocket.chat/federation-sdk';
import { Logger } from '@rocket.chat/logger';
import { Rooms, Users } from '@rocket.chat/models';

Expand Down
2 changes: 1 addition & 1 deletion ee/packages/federation-matrix/src/events/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { HomeserverEventSignatures } from '@hs/federation-sdk';
import type { Emitter } from '@rocket.chat/emitter';
import type { HomeserverEventSignatures } from '@rocket.chat/federation-sdk';

import { edus } from './edu';
import { invite } from './invite';
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/federation-matrix/src/events/invite.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { HomeserverEventSignatures } from '@hs/federation-sdk';
import { Room } from '@rocket.chat/core-services';
import { UserStatus } from '@rocket.chat/core-typings';
import type { Emitter } from '@rocket.chat/emitter';
import type { HomeserverEventSignatures } from '@rocket.chat/federation-sdk';
import { Rooms, Users } from '@rocket.chat/models';

export function invite(emitter: Emitter<HomeserverEventSignatures>) {
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/federation-matrix/src/events/member.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { HomeserverEventSignatures } from '@hs/federation-sdk';
import { Room } from '@rocket.chat/core-services';
import type { Emitter } from '@rocket.chat/emitter';
import type { HomeserverEventSignatures } from '@rocket.chat/federation-sdk';
import { Logger } from '@rocket.chat/logger';
import { Rooms, Users } from '@rocket.chat/models';

Expand Down
4 changes: 1 addition & 3 deletions ee/packages/federation-matrix/src/events/message.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { FileMessageType, MessageType, FileMessageContent } from '@hs/core';
import type { HomeserverEventSignatures } from '@hs/federation-sdk';
import type { EventID } from '@hs/room';
import { FederationMatrix, Message, MeteorService } from '@rocket.chat/core-services';
import type { IUser, IRoom, FileAttachmentProps } from '@rocket.chat/core-typings';
import type { Emitter } from '@rocket.chat/emitter';
import type { FileMessageType, MessageType, FileMessageContent, HomeserverEventSignatures, EventID } from '@rocket.chat/federation-sdk';
import { Logger } from '@rocket.chat/logger';
import { Users, Rooms, Messages } from '@rocket.chat/models';

Expand Down
Loading
Loading