diff --git a/src/lib/chat/matrix-client.ts b/src/lib/chat/matrix-client.ts index 333ba1186..4eb8f57f9 100644 --- a/src/lib/chat/matrix-client.ts +++ b/src/lib/chat/matrix-client.ts @@ -166,13 +166,15 @@ export class MatrixClient implements IChatClient { } const options: ICreateRoomOpts = { - name, preset: Preset.TrustedPrivateChat, visibility: Visibility.Private, invite: users.map((u) => u.matrixId), is_direct: true, initial_state, }; + if (name) { + options.name = name; + } const result = await this.matrix.createRoom(options); // Any room is only set as a DM based on a single user. We'll use the first one.