diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/list/RoomSummaryItemFactory.kt b/vector/src/main/java/im/vector/riotx/features/home/room/list/RoomSummaryItemFactory.kt index 05b366a605..6af6234142 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/list/RoomSummaryItemFactory.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/list/RoomSummaryItemFactory.kt @@ -93,7 +93,10 @@ class RoomSummaryItemFactory @Inject constructor(private val noticeEventFormatte val date = latestEvent.root.localDateTime() val currentDate = DateProvider.currentLocalDateTime() val isSameDay = date.toLocalDate() == currentDate.toLocalDate() - latestFormattedEvent = if (latestEvent.root.getClearType() == EventType.MESSAGE) { + latestFormattedEvent = if (latestEvent.root.isEncrypted() + && latestEvent.root.mxDecryptionResult == null) { + stringProvider.getString(R.string.encrypted_message) + } else if (latestEvent.root.getClearType() == EventType.MESSAGE) { val senderName = latestEvent.senderName() ?: latestEvent.root.senderId val content = latestEvent.root.getClearContent()?.toModel() val message = content?.body ?: ""