Allow backfill for more undownloadable attachments

This commit is contained in:
Fedor Indutny
2025-03-26 11:48:28 -07:00
committed by GitHub
parent d69887a4f9
commit 427f91f903
8 changed files with 98 additions and 49 deletions

View File

@@ -1,5 +1,6 @@
// Copyright 2018 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable max-classes-per-file */
import moment from 'moment';
import {
@@ -46,6 +47,14 @@ const MIN_HEIGHT = 50;
export class AttachmentSizeError extends Error {}
// Used for downlaods
export class AttachmentPermanentlyUndownloadableError extends Error {
constructor(message: string) {
super(`AttachmentPermanentlyUndownloadableError: ${message}`);
}
}
type ScreenshotType = Omit<AttachmentType, 'size'> & {
height: number;
width: number;