From 2749ae41f61f194226e27785e0d35225da93b691 Mon Sep 17 00:00:00 2001 From: Timo Date: Fri, 11 Apr 2025 00:17:59 +0200 Subject: [PATCH] Update default power levels for room and encrypt rooms on creation --- src/utils/matrix.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/utils/matrix.ts b/src/utils/matrix.ts index 0a2b5c1a..e0e01ab8 100644 --- a/src/utils/matrix.ts +++ b/src/utils/matrix.ts @@ -251,7 +251,8 @@ export async function createRoom( "m.room.encryption": 100, "m.room.name": 50, "m.room.message": 0, - "m.room.encrypted": 50, + // revert this once we do not rely on room messages for perSenderKeys anymore + "m.room.encrypted": 0, "m.sticker": 50, "org.matrix.msc3401.call.member": 0, }, @@ -259,6 +260,15 @@ export async function createRoom( [client.getUserId()!]: 100, }, }, + initial_state: [ + { + type: "m.room.encryption", + state_key: "", + content: { + algorithm: "m.megolm.v1.aes-sha2", + }, + }, + ], }); // Wait for the room to arrive