From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sat, 5 Jul 2025 11:31:15 +0000 (+0530) Subject: Fix new direct message showing with room (#2386) X-Git-Tag: v4.9.0~31 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=87fc490c3bf15fe98cf946325dfa835541c93da7;p=rainny.git Fix new direct message showing with room (#2386) as we were mutating the content of m.direct the sdk was comparing old value with new one and preventing update if found equal --- diff --git a/src/client/action/room.js b/src/client/action/room.js index 90b7481..767914b 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)