Dont set person on sent message notification

Signed-off-by: Alex Baker <alex@beeper.com>
This commit is contained in:
Alex Baker 2021-10-11 14:27:08 -05:00
parent 117fa71f53
commit 42cbdf0a6c
2 changed files with 10 additions and 5 deletions

1
changelog.d/4221.bugfix Normal file
View File

@ -0,0 +1 @@
Fix conversation notification for sent messages

View File

@ -325,11 +325,15 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
}
roomEventGroupInfo.hasNewEvent = roomEventGroupInfo.hasNewEvent || !event.hasBeenDisplayed
val senderPerson = Person.Builder()
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)