From dc1f0fecb5a1f6b8c0f52ba9e77d6faa44117d1f Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Mon, 6 Jun 2022 13:04:48 +0530 Subject: [PATCH] Add profile world type --- src/matrix/room/RoomBeingCreated.ts | 7 ++++--- src/matrix/room/common.ts | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/matrix/room/RoomBeingCreated.ts b/src/matrix/room/RoomBeingCreated.ts index f825c163..08c8af3d 100644 --- a/src/matrix/room/RoomBeingCreated.ts +++ b/src/matrix/room/RoomBeingCreated.ts @@ -151,9 +151,10 @@ export class RoomBeingCreated extends EventEmitter<{change: never}> { createOptions.room_alias_name = this.options.alias; } if (this.options.type !== undefined) { - createOptions.creation_content = { - type: this.options.type === RoomType.World ? "org.matrix.msc3815.world" : undefined, - }; + let type: string | undefined = undefined; + if (this.options.type === RoomType.World) type = "org.matrix.msc3815.world"; + if (this.options.type === RoomType.Profile) type = "org.matrix.msc3815.profile"; + createOptions.creation_content = { type }; } if (this.options.isFederationDisabled === true) { if (createOptions.creation_content === undefined) createOptions.creation_content = {}; diff --git a/src/matrix/room/common.ts b/src/matrix/room/common.ts index bd6adda4..ba1bd8e3 100644 --- a/src/matrix/room/common.ts +++ b/src/matrix/room/common.ts @@ -48,7 +48,8 @@ export enum RoomVisibility { } export enum RoomType { - World + World, + Profile, } type RoomResponse = {