From fede5c94e9963b86f7b499a7776cdfb4e47e4bc9 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Tue, 1 Oct 2024 10:53:00 -0500 Subject: [PATCH] fix: editing messages with voice recordings --- .../src/lib/attachment.service.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/projects/stream-chat-angular/src/lib/attachment.service.ts b/projects/stream-chat-angular/src/lib/attachment.service.ts index 508f799d..5b4b57e6 100644 --- a/projects/stream-chat-angular/src/lib/attachment.service.ts +++ b/projects/stream-chat-angular/src/lib/attachment.service.ts @@ -272,6 +272,21 @@ export class AttachmentService< thumb_url: attachment.thumb_url, fromAttachment: attachment, }); + } else if (attachment.type === 'voiceRecording') { + attachmentUploads.push({ + url: attachment.asset_url, + state: 'success', + file: { + name: attachment.title, + size: attachment.file_size, + type: attachment.mime_type, + } as File, + type: 'voiceRecording', + extraData: { + duration: attachment.duration, + waveform_data: attachment.waveform_data, + }, + }); } });