diff --git a/changelog.d/4221.bugfix b/changelog.d/4221.bugfix new file mode 100644 index 0000000000..76c66898b1 --- /dev/null +++ b/changelog.d/4221.bugfix @@ -0,0 +1 @@ +Fix conversation notification for sent messages diff --git a/vector/src/main/java/im/vector/app/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/app/features/notifications/NotificationDrawerManager.kt index 37de7b1a75..7d75fd27d5 100644 --- a/vector/src/main/java/im/vector/app/features/notifications/NotificationDrawerManager.kt +++ b/vector/src/main/java/im/vector/app/features/notifications/NotificationDrawerManager.kt @@ -325,11 +325,15 @@ class NotificationDrawerManager @Inject constructor(private val context: Context } roomEventGroupInfo.hasNewEvent = roomEventGroupInfo.hasNewEvent || !event.hasBeenDisplayed - val senderPerson = Person.Builder() - .setName(event.senderName) - .setIcon(iconLoader.getUserIcon(event.senderAvatarPath)) - .setKey(event.senderId) - .build() + val senderPerson = if (event.outGoingMessage) { + null + } else { + Person.Builder() + .setName(event.senderName) + .setIcon(iconLoader.getUserIcon(event.senderAvatarPath)) + .setKey(event.senderId) + .build() + } if (event.outGoingMessage && event.outGoingMessageFailed) { style.addMessage(stringProvider.getString(R.string.notification_inline_reply_failed), event.timestamp, senderPerson)