Merge pull request #4222 from abaker/fix_outgoing_conversation_notifications

Dont set person on sent message notification
This commit is contained in:
Benoit Marty 2021-10-14 10:45:26 +02:00 committed by GitHub
commit 7ec0872b78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -330,11 +330,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 (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val openRoomIntent = RoomDetailActivity.shortcutIntent(context, roomId)