Do not download media if in call

This commit is contained in:
Josh Perez 2021-01-29 17:58:28 -05:00 committed by GitHub
parent d22add261b
commit a096220990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 274 additions and 47 deletions

View file

@ -169,6 +169,16 @@ export function isVideoAttachment(
);
}
export function hasNotDownloaded(attachment?: AttachmentType): boolean {
return Boolean(attachment && !attachment.url && attachment.blurHash);
}
export function hasVideoBlurHash(attachments?: Array<AttachmentType>): boolean {
const firstAttachment = attachments ? attachments[0] : null;
return Boolean(firstAttachment && firstAttachment.blurHash);
}
export function hasVideoScreenshot(
attachments?: Array<AttachmentType>
): string | null | undefined {