Skip to content

Commit ace067e

Browse files
committed
Remove FOSS federation matrix runtime dependency
1 parent 0c17074 commit ace067e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

apps/meteor/app/slashcommands-invite/server/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { api, FederationMatrix, isMeteorError } from '@rocket.chat/core-services';
22
import type { IUser, SlashCommandCallbackParams } from '@rocket.chat/core-typings';
33
import { isBannedSubscription } from '@rocket.chat/core-typings';
4-
import { validateFederatedUsername } from '@rocket.chat/federation-matrix';
54
import { Subscriptions, Users, Rooms } from '@rocket.chat/models';
65
import { Meteor } from 'meteor/meteor';
76

@@ -16,6 +15,8 @@ function isStringError(error: unknown): error is { error: string } {
1615
return typeof (error as any)?.error === 'string';
1716
}
1817

18+
const validateFederatedUsername = (): false => false;
19+
1920
/*
2021
* Invite is a named function that will replace /invite commands
2122
* @param {Object} message - The message object

apps/meteor/server/settings/federation-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { generateEd25519RandomSecretKey } from '@rocket.chat/federation-matrix';
1+
import { randomBytes } from 'crypto';
22

33
import { settingsRegistry } from '../../app/settings/server';
44

@@ -39,7 +39,7 @@ export const createFederationServiceSettings = async (): Promise<void> => {
3939
invalidValue: '0',
4040
});
4141

42-
const randomKey = generateEd25519RandomSecretKey().toString('base64');
42+
const randomKey = randomBytes(32).toString('base64');
4343

4444
// https://spec.matrix.org/v1.16/appendices/#signing-details
4545
await this.add('Federation_Service_Matrix_Signing_Key', randomKey, {

0 commit comments

Comments
 (0)