Fix / Action bottom sheet show preview for encrypted messages

This commit is contained in:
Valere 2019-06-27 15:21:10 +02:00
parent f98f0e1a87
commit 0765d6d1da
1 changed files with 2 additions and 1 deletions

View File

@ -66,9 +66,10 @@ class MessageActionsViewModel(initialState: MessageActionState) : VectorViewMode
var body: CharSequence? = null
val originTs = event?.root?.originServerTs
return if (event != null) {
when (event.root.type) {
when (event.root.getClearType()) {
EventType.MESSAGE -> {
val messageContent: MessageContent? = event.annotations?.editSummary?.aggregatedContent?.toModel()
?: event.root.getClearContent().toModel()
?: event.root.content.toModel()
body = messageContent?.body
if (messageContent is MessageTextContent && messageContent.format == MessageType.FORMAT_MATRIX_HTML) {