From 141b46dfc3753553d13b03634522417f0b6acb1c Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Fri, 30 Dec 2022 18:18:06 +0100 Subject: [PATCH] Fix clicking on bridge contact opening bridge bot in encrypted chats Change-Id: I8749244f393639740885c7086a18cd127274baa7 --- .../detail/timeline/helper/MessageInformationDataFactory.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MessageInformationDataFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MessageInformationDataFactory.kt index 1725759307..4902cc047f 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MessageInformationDataFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MessageInformationDataFactory.kt @@ -189,9 +189,9 @@ class MessageInformationDataFactory @Inject constructor( } private fun getSenderId(event: TimelineEvent) = if (event.isEncrypted()) { - event.root.toValidDecryptedEvent()?.let { + event.root.senderId ?: event.root.toValidDecryptedEvent()?.let { session.cryptoService().deviceWithIdentityKey(it.cryptoSenderKey, it.algorithm)?.userId - } ?: event.root.senderId.orEmpty() + }.orEmpty() } else { event.root.senderId.orEmpty() }