diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index 3b1194690..51aba8f9b 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -197,6 +197,7 @@ Future _tryPushHelper( final id = notification.roomId.hashCode; + final senderName = event.senderFromMemoryOrFallback.calcDisplayname(); // Show notification final newMessage = Message( @@ -205,7 +206,7 @@ Future _tryPushHelper( Person( bot: event.messageType == MessageTypes.Notice, key: event.senderId, - name: event.senderFromMemoryOrFallback.calcDisplayname(), + name: senderName, icon: senderAvatarFile == null ? null : ByteArrayAndroidIcon(senderAvatarFile), @@ -252,14 +253,14 @@ Future _tryPushHelper( styleInformation: messagingStyleInformation ?? MessagingStyleInformation( Person( - name: event.senderFromMemoryOrFallback.calcDisplayname(), + name: senderName, icon: roomAvatarFile == null ? null : ByteArrayAndroidIcon(roomAvatarFile), key: event.roomId, important: event.room.isFavourite, ), - conversationTitle: roomName, + conversationTitle: event.room.isDirectChat ? null : roomName, groupConversation: !event.room.isDirectChat, messages: [newMessage], ),