mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-01 20:37:41 +01:00
Follow the spec
https://github.com/matrix-org/matrix-doc/blob/travis/msc/voice-messages/proposals/3245-voice-messages.md#unstable-prefix
This commit is contained in:
parent
79f4053ab4
commit
2ca0a99dce
@ -20,6 +20,7 @@ import com.squareup.moshi.Json
|
||||
import com.squareup.moshi.JsonClass
|
||||
import org.matrix.android.sdk.api.session.events.model.Content
|
||||
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
|
||||
import org.matrix.android.sdk.api.util.JsonDict
|
||||
import org.matrix.android.sdk.internal.crypto.model.rest.AudioWaveformInfo
|
||||
import org.matrix.android.sdk.internal.crypto.model.rest.EncryptedFileInfo
|
||||
|
||||
@ -61,7 +62,7 @@ data class MessageAudioContent(
|
||||
/**
|
||||
* Indicates that is a voice message.
|
||||
*/
|
||||
@Json(name = "org.matrix.msc2516.voice") val voiceMessageIndicator: Any? = null
|
||||
@Json(name = "org.matrix.msc3245.voice") val voiceMessageIndicator: JsonDict? = null
|
||||
) : MessageWithAttachmentContent {
|
||||
|
||||
override val mimeType: String?
|
||||
|
@ -303,7 +303,7 @@ internal class LocalEchoEventFactory @Inject constructor(
|
||||
duration = attachment.duration?.toInt(),
|
||||
waveform = attachment.waveform
|
||||
),
|
||||
voiceMessageIndicator = if (!isVoiceMessage) null else Any()
|
||||
voiceMessageIndicator = if (!isVoiceMessage) null else emptyMap()
|
||||
)
|
||||
return createMessageEvent(roomId, content)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user