diff --git a/app/components/MessageAttachments/MessageAttachments.tsx b/app/components/MessageAttachments/MessageAttachments.tsx index 44c7714..6446d1e 100644 --- a/app/components/MessageAttachments/MessageAttachments.tsx +++ b/app/components/MessageAttachments/MessageAttachments.tsx @@ -42,6 +42,7 @@ export function MessageAttachments(props: MessageAttachmentsProps) { text: props.text, parent: props.parent, } + console.info("Rendering attachment", attachProps); switch (att.type) { case AttachmentType.MESSAGES: return diff --git a/app/components/MessageAttachments/MessageImage.tsx b/app/components/MessageAttachments/MessageImage.tsx index 5c3b016..695fa7d 100644 --- a/app/components/MessageAttachments/MessageImage.tsx +++ b/app/components/MessageAttachments/MessageImage.tsx @@ -29,6 +29,7 @@ export function MessageImage(props: AttachmentProps) { const [blurhashPreview, setBlurhashPreview] = useState(""); useEffect(() => { + console.info("Consturcting image, download status: " + downloadStatus); constructBlob(); constructFromBlurhash(); }, [downloadStatus]); diff --git a/app/providers/DialogProvider/DialogProvider.tsx b/app/providers/DialogProvider/DialogProvider.tsx index d5fe8b7..38affed 100644 --- a/app/providers/DialogProvider/DialogProvider.tsx +++ b/app/providers/DialogProvider/DialogProvider.tsx @@ -840,10 +840,13 @@ export function DialogProvider(props: DialogProviderProps) { }); continue; } - const decrypted = await decodeWithPassword(privatePlain, Buffer.from(fileData, 'binary').toString()); + let blob = ""; + if(meta.type != AttachmentType.IMAGE){ + blob = await decodeWithPassword(privatePlain, Buffer.from(fileData, 'binary').toString()); + } attachments.push({ id: meta.id, - blob: decrypted, + blob: blob, type: meta.type, preview: meta.preview });