Prefer testing attachment.waveform to see if it's a voice message

This commit is contained in:
Benoit Marty 2021-07-09 22:17:04 +02:00
parent 984112e83f
commit db80ea6432
1 changed files with 1 additions and 1 deletions

View File

@ -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",