From f8a961609efc54a8ed3dbf37e37bdc455108d946 Mon Sep 17 00:00:00 2001 From: Dale Fukami Date: Thu, 5 Oct 2023 09:22:38 -0600 Subject: [PATCH] CreateConversation: Only send the name field if it is not null (#1073) --- src/lib/chat/matrix-client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/chat/matrix-client.ts b/src/lib/chat/matrix-client.ts index f077ca94f..44b50812b 100644 --- a/src/lib/chat/matrix-client.ts +++ b/src/lib/chat/matrix-client.ts @@ -170,13 +170,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.