Enable more specific AttachmentDownload prioritization

This commit is contained in:
trevor-signal
2024-04-15 20:11:48 -04:00
committed by GitHub
parent 87ea909ae9
commit fc02762588
26 changed files with 2245 additions and 817 deletions

View File

@@ -1,7 +1,9 @@
// Copyright 2018 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { z } from 'zod';
export type MIMEType = string & { _mimeTypeBrand: never };
export const MIMETypeSchema = z.string().brand('mimeType');
export type MIMEType = z.infer<typeof MIMETypeSchema>;
export const stringToMIMEType = (value: string): MIMEType => {
return value as MIMEType;