Skip to content

Commit fc2d609

Browse files
ricardogarimggazzo
authored andcommitted
chore(federation): rely on MongoDB client to parse db name instead of manual URL parsing (#37571)
1 parent 35c34f4 commit fc2d609

File tree

1 file changed

+1
-6
lines changed
  • ee/packages/federation-matrix/src

1 file changed

+1
-6
lines changed

ee/packages/federation-matrix/src/setup.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,12 @@ export function configureFederationMatrixSettings(settings: {
101101
}
102102

103103
export async function setupFederationMatrix() {
104-
// TODO are these required?
105-
const mongoUri = process.env.MONGO_URL || 'mongodb://localhost:3001/meteor';
106-
const dbName = process.env.DATABASE_NAME || new URL(mongoUri).pathname.slice(1);
107-
108104
const eventHandler = new Emitter<HomeserverEventSignatures>();
109105

110106
await init({
111107
emitter: eventHandler,
112108
dbConfig: {
113-
uri: mongoUri,
114-
name: dbName,
109+
uri: process.env.MONGO_URL || 'mongodb://localhost:3001/meteor',
115110
poolSize: Number.parseInt(process.env.DATABASE_POOL_SIZE || '10', 10),
116111
},
117112
});

0 commit comments

Comments
 (0)