From 372737d075b63bb7f024a42cd9c2d82d1cc3805c Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Tue, 28 Nov 2023 13:13:31 +0100 Subject: [PATCH] Always allow call.member events on new rooms (#11948) * Always allow call.member events on new rooms This translate to: allow group calls by default Signed-off-by: Timo K * fix tests Signed-off-by: Timo K --------- Signed-off-by: Timo K --- src/createRoom.ts | 6 +++--- test/createRoom-test.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/createRoom.ts b/src/createRoom.ts index 4f79cb9c64..579eeab7f3 100644 --- a/src/createRoom.ts +++ b/src/createRoom.ts @@ -187,9 +187,9 @@ export default async function createRoom(client: MatrixClient, opts: IOpts): Pro createOpts.power_level_content_override = { events: { ...DEFAULT_EVENT_POWER_LEVELS, - // Element Call should be disabled by default - [ElementCall.MEMBER_EVENT_TYPE.name]: 100, - // Make sure only admins can enable it + // It should always (including non video rooms) be possible to join a group call. + [ElementCall.MEMBER_EVENT_TYPE.name]: 0, + // Make sure only admins can enable it (DEPRECATED) [ElementCall.CALL_EVENT_TYPE.name]: 100, }, }; diff --git a/test/createRoom-test.ts b/test/createRoom-test.ts index fa1c31a02f..91b274c6df 100644 --- a/test/createRoom-test.ts +++ b/test/createRoom-test.ts @@ -127,7 +127,7 @@ describe("createRoom", () => { ]; expect(callPower).toBe(100); - expect(callMemberPower).toBe(100); + expect(callMemberPower).toBe(0); }); it("should upload avatar if one is passed", async () => {