From 30c27f00a1f065290509b5bbdb4154830105e930 Mon Sep 17 00:00:00 2001 From: The one with the braid Date: Fri, 4 Aug 2023 08:17:17 +0200 Subject: [PATCH] fix: direct message room name computation Signed-off-by: The one with the braid --- lib/src/room.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/room.dart b/lib/src/room.dart index e057dcc9..1532850d 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -249,7 +249,10 @@ class Room { (directChatMatrixID == null ? [] : [directChatMatrixID]); if (heroes.isNotEmpty) { final result = heroes - .where((hero) => hero.isNotEmpty) + .where( + // removing oneself from the hero list + (hero) => hero.isNotEmpty && hero != client.userID, + ) .map((hero) => unsafeGetUserFromMemoryOrFallback(hero) .calcDisplayname(i18n: i18n)) .join(', ');