From 45837f73770b78a550301abd8c22b70f5f18d164 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 5 May 2021 17:11:53 +0200 Subject: [PATCH] don't set dmUserId when not a DM --- src/matrix/room/RoomSummary.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/matrix/room/RoomSummary.js b/src/matrix/room/RoomSummary.js index 86927e03..6d7d0cac 100644 --- a/src/matrix/room/RoomSummary.js +++ b/src/matrix/room/RoomSummary.js @@ -183,10 +183,11 @@ function applyInvite(data, invite) { if (data.isDirectMessage !== invite.isDirectMessage) { data = data.cloneIfNeeded(); data.isDirectMessage = invite.isDirectMessage; - } - if (data.dmUserId !== invite.inviter?.userId) { - data = data.cloneIfNeeded(); - data.dmUserId = invite.inviter?.userId; + if (invite.isDirectMessage) { + data.dmUserId = invite.inviter?.userId; + } else { + data.dmUserId = null; + } } return data; }