diff --git a/app/containers/message/hooks/useMediaAutoDownload.tsx b/app/containers/message/hooks/useMediaAutoDownload.tsx index a884a6941b..f5ddebfe53 100644 --- a/app/containers/message/hooks/useMediaAutoDownload.tsx +++ b/app/containers/message/hooks/useMediaAutoDownload.tsx @@ -136,10 +136,10 @@ export const useMediaAutoDownload = ({ urlToCache: url }); if (result?.exists && !isEncrypted) { - if(!currentFile?.title_link) { - persistMessageWithCacheFile(id, result.uri, file.encryption, file.image_url || url); + if (!currentFile?.title_link) { + await persistMessageWithCacheFile(id, result.uri, file.encryption, file.image_url || url); } - + updateCurrentFile(result.uri); } return result?.exists;