diff --git a/src/components/common/messaging/attachments/AttachmentActions.tsx b/src/components/common/messaging/attachments/AttachmentActions.tsx index 054fc986..f33eebfa 100644 --- a/src/components/common/messaging/attachments/AttachmentActions.tsx +++ b/src/components/common/messaging/attachments/AttachmentActions.tsx @@ -23,7 +23,7 @@ export default function AttachmentActions({ attachment }: Props) { const client = useContext(AppContext); const { filename, metadata, size } = attachment; - const url = client.generateFileURL(attachment) as string; + const url = client.generateFileURL(attachment)!; const open_url = `${url}/${filename}`; const download_url = url.replace('attachments', 'attachments/download') diff --git a/src/components/common/messaging/attachments/TextFile.tsx b/src/components/common/messaging/attachments/TextFile.tsx index 4dd8d432..810a2f0b 100644 --- a/src/components/common/messaging/attachments/TextFile.tsx +++ b/src/components/common/messaging/attachments/TextFile.tsx @@ -18,7 +18,7 @@ export default function TextFile({ attachment }: Props) { const status = useContext(StatusContext); const client = useContext(AppContext); - const url = client.generateFileURL(attachment); + const url = client.generateFileURL(attachment)!; useEffect(() => { if (typeof content !== 'undefined') return; diff --git a/src/components/common/messaging/embed/EmbedMedia.tsx b/src/components/common/messaging/embed/EmbedMedia.tsx index 7323f03d..70c04579 100644 --- a/src/components/common/messaging/embed/EmbedMedia.tsx +++ b/src/components/common/messaging/embed/EmbedMedia.tsx @@ -43,7 +43,7 @@ export default function EmbedMedia({ embed, width, height }: Props) { ) case 'Soundcloud': return (