From d5625b95fed9a5e02f4ec77e890395a58624d931 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 27 Jun 2019 17:58:11 +0200 Subject: [PATCH] Fix / use senderId when display name cannot be resolved --- .../features/notifications/NotifiableEventResolver.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt index ca2ec6142e..beaebdbd8c 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt @@ -98,7 +98,7 @@ class NotifiableEventResolver(private val stringProvider: StringProvider, ?: event.root.getClearContent().toModel()?.body ?: stringProvider.getString(R.string.notification_unknown_new_event) val roomName = stringProvider.getString(R.string.notification_unknown_room_name) - val senderDisplayName = event.senderName + val senderDisplayName = event.senderName ?: event.root.senderId val notifiableEvent = NotifiableMessageEvent( eventId = event.root.eventId!!, @@ -117,7 +117,7 @@ class NotifiableEventResolver(private val stringProvider: StringProvider, ?: event.root.getClearContent().toModel()?.body ?: stringProvider.getString(R.string.notification_unknown_new_event) val roomName = room.roomSummary?.displayName ?: "" - val senderDisplayName = event.senderName ?: "" + val senderDisplayName = event.senderName ?: event.root.senderId val notifiableEvent = NotifiableMessageEvent( eventId = event.root.eventId!!,