Skip to content

Commit

Permalink
Tidy usage of an undefined default room version
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Johnson <krinkodot22@hotmail.com>
  • Loading branch information
mrjohnson22 committed Jul 4, 2023
1 parent 8dd780a commit 25dd3e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class DiscordBridgeConfigBridge {
public disableTypingNotifications: boolean;
public disableDiscordMentions: boolean;
public disableDeletionForwarding: boolean;
public defaultRoomVersion: string|undefined;
public defaultRoomVersion?: string;
public enableSelfServiceBridging: boolean;
public disablePortalBridging: boolean;
public disableReadReceipts: boolean;
Expand Down
4 changes: 3 additions & 1 deletion src/matrixroomhandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ export class MatrixRoomHandler {
],
room_alias_name: aliasLocalpart,
visibility: this.config.room.defaultVisibility,
room_version: this.config.bridge.defaultRoomVersion,
/* eslint-enable @typescript-eslint/naming-convention */
};
if (this.config.bridge.defaultRoomVersion !== undefined) {
creationOpts["room_version"] = this.config.bridge.defaultRoomVersion;
}
// We need to temporarily store this until we know the room_id.
await this.roomStore.linkRooms(
new MatrixStoreRoom(alias),
Expand Down

0 comments on commit 25dd3e8

Please sign in to comment.