From f2633647af742c7672a109603f15119e49dd7430 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Thu, 12 May 2022 21:27:13 -0700 Subject: [PATCH 1/5] fix common.ts import --- src/matrix/room/Room.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index 796474d3..38982786 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -23,7 +23,7 @@ import {WrappedError} from "../error.js" import {Heroes} from "./members/Heroes.js"; import {AttachmentUpload} from "./AttachmentUpload.js"; import {DecryptionSource} from "../e2ee/common.js"; -import {iterateResponseStateEvents} from "./common.js"; +import {iterateResponseStateEvents} from "./common"; import {PowerLevels, EVENT_TYPE as POWERLEVELS_EVENT_TYPE } from "./PowerLevels.js"; const EVENT_ENCRYPTED_TYPE = "m.room.encrypted"; From 8f3adf7dc6ad44b86e388bd1b284aabce6caf457 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Thu, 12 May 2022 21:31:07 -0700 Subject: [PATCH 2/5] Export RoomType --- src/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.ts b/src/lib.ts index 20a8a7d7..854248c2 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -80,7 +80,7 @@ export {TemplateView} from "./platform/web/ui/general/TemplateView"; export {ViewModel} from "./domain/ViewModel"; export {LoadingView} from "./platform/web/ui/general/LoadingView.js"; export {AvatarView} from "./platform/web/ui/AvatarView.js"; -export {RoomVisibility} from "./matrix/room/common"; +export {RoomVisibility, RoomType} from "./matrix/room/common"; export {EventEmitter} from "./utils/EventEmitter"; export {Disposables} from "./utils/Disposables"; export {LocalMedia} from "./matrix/calls/LocalMedia"; From b9eb45a6028c9b5d4dc5e1b3963b7c3d2028c75c Mon Sep 17 00:00:00 2001 From: Robert Long Date: Thu, 12 May 2022 21:31:17 -0700 Subject: [PATCH 3/5] v0.0.7 --- scripts/sdk/base-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sdk/base-manifest.json b/scripts/sdk/base-manifest.json index 03e052d2..91955d52 100644 --- a/scripts/sdk/base-manifest.json +++ b/scripts/sdk/base-manifest.json @@ -1,7 +1,7 @@ { "name": "@thirdroom/hydrogen-view-sdk", "description": "Embeddable matrix client library, including view components", - "version": "0.0.6", + "version": "0.0.7", "main": "./hydrogen.es.js", "type": "module" } From 675ec273fe9e7fc52769c85eaaa95bc9fe1b7a89 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Fri, 13 May 2022 11:48:47 +0530 Subject: [PATCH 4/5] Fix room type with federation allowded --- src/matrix/room/RoomBeingCreated.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/matrix/room/RoomBeingCreated.ts b/src/matrix/room/RoomBeingCreated.ts index 9fe8c31e..f825c163 100644 --- a/src/matrix/room/RoomBeingCreated.ts +++ b/src/matrix/room/RoomBeingCreated.ts @@ -36,7 +36,7 @@ type CreateRoomPayload = { topic?: string; invite?: string[]; room_alias_name?: string; - creation_content?: {"m.federate": boolean, type?: string}; + creation_content?: {"m.federate"?: boolean, type?: string}; initial_state: {type: string; state_key: string; content: Record}[] power_level_content_override?: any; } @@ -150,12 +150,15 @@ export class RoomBeingCreated extends EventEmitter<{change: never}> { if (this.options.alias) { createOptions.room_alias_name = this.options.alias; } - if (this.options.isFederationDisabled === true) { + if (this.options.type !== undefined) { createOptions.creation_content = { type: this.options.type === RoomType.World ? "org.matrix.msc3815.world" : undefined, - "m.federate": false }; } + if (this.options.isFederationDisabled === true) { + if (createOptions.creation_content === undefined) createOptions.creation_content = {}; + createOptions.creation_content["m.federate"] = false; + } if (this.isEncrypted) { createOptions.initial_state.push(createRoomEncryptionEvent()); } From 165b76a48677f8f8e21f51c084be0b6195cfd540 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Mon, 16 May 2022 11:29:44 -0700 Subject: [PATCH 5/5] v0.0.8 --- scripts/sdk/base-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sdk/base-manifest.json b/scripts/sdk/base-manifest.json index 91955d52..4c79b502 100644 --- a/scripts/sdk/base-manifest.json +++ b/scripts/sdk/base-manifest.json @@ -1,7 +1,7 @@ { "name": "@thirdroom/hydrogen-view-sdk", "description": "Embeddable matrix client library, including view components", - "version": "0.0.7", + "version": "0.0.8", "main": "./hydrogen.es.js", "type": "module" }