Merge pull request #1540 from famedly/braid/remove-oneself-from-hero-list
fix: direct message room name computation
This commit is contained in:
commit
230510555d
|
|
@ -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(', ');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue