Additional logging, more reliable contact/group sync fetch
This commit is contained in:
parent
8e1a30d720
commit
efc237d106
11 changed files with 86 additions and 16 deletions
|
@ -15,7 +15,11 @@ import type { WebAPIType } from './WebAPI';
|
|||
|
||||
export async function downloadAttachment(
|
||||
server: WebAPIType,
|
||||
attachment: ProcessedAttachment
|
||||
attachment: ProcessedAttachment,
|
||||
options?: {
|
||||
disableRetries?: boolean;
|
||||
timeout?: number;
|
||||
}
|
||||
): Promise<DownloadedAttachmentType> {
|
||||
const cdnId = attachment.cdnId || attachment.cdnKey;
|
||||
const { cdnNumber } = attachment;
|
||||
|
@ -25,7 +29,11 @@ export async function downloadAttachment(
|
|||
}
|
||||
|
||||
strictAssert(cdnId, 'attachment without cdnId');
|
||||
const encrypted = await server.getAttachment(cdnId, dropNull(cdnNumber));
|
||||
const encrypted = await server.getAttachment(
|
||||
cdnId,
|
||||
dropNull(cdnNumber),
|
||||
options
|
||||
);
|
||||
const { key, digest, size, contentType } = attachment;
|
||||
|
||||
if (!digest) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue