Limit unnecessary thumbnail generation

This commit is contained in:
trevor-signal
2025-09-24 10:55:08 -04:00
committed by GitHub
parent 9c97d3e73c
commit 74e327a6c4
14 changed files with 132 additions and 81 deletions

View File

@@ -6,9 +6,9 @@ import * as z from 'zod';
import type { LoggerType } from '../../types/Logging.js';
import {
attachmentDownloadTypeSchema,
messageAttachmentTypeSchema,
type AttachmentDownloadJobType,
type AttachmentDownloadJobTypeType,
type MessageAttachmentType,
} from '../../types/AttachmentDownload.js';
import type { AttachmentType } from '../../types/Attachment.js';
import { jsonToObject, objectToJSON, sql } from '../util.js';
@@ -28,7 +28,7 @@ export type _AttachmentDownloadJobTypeV1030 = {
messageId: string;
pending: number;
timestamp: number;
type: AttachmentDownloadJobTypeType;
type: MessageAttachmentType;
};
const attachmentDownloadJobSchemaV1040 = z
@@ -36,7 +36,7 @@ const attachmentDownloadJobSchemaV1040 = z
attachment: z
.object({ size: z.number(), contentType: MIMETypeSchema })
.passthrough(),
attachmentType: attachmentDownloadTypeSchema,
attachmentType: messageAttachmentTypeSchema,
ciphertextSize: z.number(),
contentType: MIMETypeSchema,
digest: z.string(),