From db80ea6432aeed0fcd5d24a202b099bc0e26be2a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 9 Jul 2021 22:17:04 +0200 Subject: [PATCH] Prefer testing attachment.waveform to see if it's a voice message --- .../sdk/internal/session/room/send/LocalEchoEventFactory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt index f7941ea56e..fb56587ac1 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt @@ -290,7 +290,7 @@ internal class LocalEchoEventFactory @Inject constructor( } private fun createAudioEvent(roomId: String, attachment: ContentAttachmentData): Event { - val isVoiceMessage = attachment.mimeType == "audio/ogg" + val isVoiceMessage = attachment.waveform != null val content = MessageAudioContent( msgType = MessageType.MSGTYPE_AUDIO, body = attachment.name ?: "audio",