Merge pull request #1540 from famedly/braid/remove-oneself-from-hero-list

fix: direct message room name computation
This commit is contained in:
Krille-chan 2023-08-04 06:41:32 +00:00 committed by GitHub
commit 230510555d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -249,7 +249,10 @@ class Room {
(directChatMatrixID == null ? [] : [directChatMatrixID]); (directChatMatrixID == null ? [] : [directChatMatrixID]);
if (heroes.isNotEmpty) { if (heroes.isNotEmpty) {
final result = heroes final result = heroes
.where((hero) => hero.isNotEmpty) .where(
// removing oneself from the hero list
(hero) => hero.isNotEmpty && hero != client.userID,
)
.map((hero) => unsafeGetUserFromMemoryOrFallback(hero) .map((hero) => unsafeGetUserFromMemoryOrFallback(hero)
.calcDisplayname(i18n: i18n)) .calcDisplayname(i18n: i18n))
.join(', '); .join(', ');