vector-im/element-ios/issues/4753 - Allow audio file attachments to be played back inline by reusing the existing voice message UI.

This commit is contained in:
Stefan Ceriu
2021-12-02 14:32:02 +02:00
committed by Stefan Ceriu
parent 20f1a6d238
commit 3c3b8f24ba
4 changed files with 4 additions and 3 deletions
@@ -85,7 +85,7 @@ class VoiceMessageAttachmentCacheManager {
}
func loadAttachment(_ attachment: MXKAttachment, numberOfSamples: Int, completion: @escaping (Result<VoiceMessageAttachmentCacheManagerLoadResult, Error>) -> Void) {
guard attachment.type == MXKAttachmentTypeVoiceMessage else {
guard attachment.type == MXKAttachmentTypeVoiceMessage || attachment.type == MXKAttachmentTypeAudio else {
completion(Result.failure(VoiceMessageAttachmentCacheManagerError.invalidAttachmentType))
MXLog.error("[VoiceMessageAttachmentCacheManager] Invalid attachment type, ignoring request.")
return