Reuse recent CDN locators

This commit is contained in:
trevor-signal
2026-02-24 12:58:17 -05:00
committed by GitHub
parent d38277e2ce
commit 239b57576f
8 changed files with 398 additions and 120 deletions

View File

@@ -804,6 +804,16 @@ strictAssert(
'attachment_columns must match DB fields type'
);
export type ExistingAttachmentUploadData = {
cdnKey: string;
cdnNumber: number;
digest: string;
key: string;
uploadTimestamp: number;
incrementalMac: string | null;
chunkSize: number | null;
};
export type ExistingAttachmentData = Pick<
MessageAttachmentDBType,
| 'version'
@@ -1085,6 +1095,10 @@ type ReadableInterface = {
version: number
) => Array<MessageAttributesType>;
getMostRecentAttachmentUploadData: (
plaintextHash: string
) => ExistingAttachmentUploadData | undefined;
__dangerouslyRunAbitraryReadOnlySqlQuery: (
readOnlySqlQuery: string
) => ReadonlyArray<RowType<object>>;