chore: Remove conversationTitle if room is dm room in android notifications

pull/1388/merge
krille-chan 8 months ago
parent 7feb815250
commit 5321a3768d
No known key found for this signature in database

@ -197,6 +197,7 @@ Future<void> _tryPushHelper(
final id = notification.roomId.hashCode;
final senderName = event.senderFromMemoryOrFallback.calcDisplayname();
// Show notification
final newMessage = Message(
@ -205,7 +206,7 @@ Future<void> _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<void> _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],
),

Loading…
Cancel
Save