mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Allow manually retrying attachment downloads
This commit is contained in:
@@ -254,6 +254,7 @@ const dataInterface: ClientInterface = {
|
||||
removeUnprocessed,
|
||||
removeAllUnprocessed,
|
||||
|
||||
getAttachmentDownloadJobById,
|
||||
getNextAttachmentDownloadJobs,
|
||||
saveAttachmentDownloadJob,
|
||||
resetAttachmentDownloadPending,
|
||||
@@ -1476,6 +1477,9 @@ async function removeAllUnprocessed() {
|
||||
|
||||
// Attachment downloads
|
||||
|
||||
async function getAttachmentDownloadJobById(id: string) {
|
||||
return channels.getAttachmentDownloadJobById(id);
|
||||
}
|
||||
async function getNextAttachmentDownloadJobs(
|
||||
limit?: number,
|
||||
options?: { timestamp?: number }
|
||||
|
||||
@@ -496,6 +496,9 @@ export type DataInterface = {
|
||||
removeUnprocessed: (id: string | Array<string>) => Promise<void>;
|
||||
removeAllUnprocessed: () => Promise<void>;
|
||||
|
||||
getAttachmentDownloadJobById: (
|
||||
id: string
|
||||
) => Promise<AttachmentDownloadJobType | undefined>;
|
||||
getNextAttachmentDownloadJobs: (
|
||||
limit?: number,
|
||||
options?: { timestamp?: number }
|
||||
|
||||
@@ -251,6 +251,7 @@ const dataInterface: ServerInterface = {
|
||||
removeUnprocessed,
|
||||
removeAllUnprocessed,
|
||||
|
||||
getAttachmentDownloadJobById,
|
||||
getNextAttachmentDownloadJobs,
|
||||
saveAttachmentDownloadJob,
|
||||
resetAttachmentDownloadPending,
|
||||
@@ -3299,6 +3300,11 @@ async function removeAllUnprocessed(): Promise<void> {
|
||||
// Attachment Downloads
|
||||
|
||||
const ATTACHMENT_DOWNLOADS_TABLE = 'attachment_downloads';
|
||||
async function getAttachmentDownloadJobById(
|
||||
id: string
|
||||
): Promise<AttachmentDownloadJobType | undefined> {
|
||||
return getById(getInstance(), ATTACHMENT_DOWNLOADS_TABLE, id);
|
||||
}
|
||||
async function getNextAttachmentDownloadJobs(
|
||||
limit?: number,
|
||||
options: { timestamp?: number } = {}
|
||||
|
||||
Reference in New Issue
Block a user