From 748563734036647eb783c89ff7a6ee62ccce210c Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 14 May 2020 07:21:52 +0000 Subject: [PATCH] Update lib/src/room.dart --- lib/src/room.dart | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/src/room.dart b/lib/src/room.dart index 67f5291..5be217d 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -294,18 +294,10 @@ class Room { (mHeroes != null && mHeroes.isNotEmpty)) { return i18n.groupWith(displayname); } - if ((name?.isEmpty ?? true) && - (canonicalAlias?.isEmpty ?? true) && - !isDirectChat && - (mHeroes?.isEmpty ?? true)) { - if (membership == Membership.invite) { - final sender = - getState('m.room.member', client.userID)?.sender?.calcDisplayname(); - if (sender != null) return sender; - } - return i18n.emptyChat; + if (displayname?.isNotEmpty ?? false) { + return displayname; } - return displayname; + return i18n.emptyChat; } /// The topic of the room if set by a participant.