Distinguish Audio and Voice media items.

This commit is contained in:
Benoit Marty 2024-12-16 09:53:02 +01:00 committed by Benoit Marty
parent 83e474f118
commit df72ab6a86
13 changed files with 324 additions and 51 deletions

View file

@ -125,3 +125,24 @@ fun anAudioMediaInfo(
dateSentFull = dateSentFull,
waveform = waveForm,
)
fun aVoiceMediaInfo(
filename: String = "a voice file.ogg",
caption: String? = null,
senderName: String? = null,
dateSent: String? = null,
dateSentFull: String? = null,
waveForm: List<Float>? = null,
): MediaInfo = MediaInfo(
filename = filename,
caption = caption,
mimeType = MimeTypes.Ogg,
formattedFileSize = "3MB",
fileExtension = "ogg",
senderId = UserId("@alice:server.org"),
senderName = senderName,
senderAvatar = null,
dateSent = dateSent,
dateSentFull = dateSentFull,
waveform = waveForm,
)