From c53c3ef2502f25d298bbee7a89db962dec6757f7 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sat, 5 Jul 2025 09:41:15 +0530 Subject: [PATCH] fix room is not being added to mDirect as we were mutating the content of m.direct the sdk was comparing old value with new one and preventing update if found equal --- src/client/action/room.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/action/room.js b/src/client/action/room.js index 90b74810..767914b5 100644 --- a/src/client/action/room.js +++ b/src/client/action/room.js @@ -12,7 +12,7 @@ function addRoomToMDirect(mx, roomId, userId) { const mDirectsEvent = mx.getAccountData('m.direct'); let userIdToRoomIds = {}; - if (typeof mDirectsEvent !== 'undefined') userIdToRoomIds = mDirectsEvent.getContent(); + if (typeof mDirectsEvent !== 'undefined') userIdToRoomIds = structuredClone(mDirectsEvent.getContent()); // remove it from the lists of any others users // (it can only be a DM room for one person)