mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Move to MessageCache.saveMessage, queue downloads piecemeal
This commit is contained in:
@@ -10,7 +10,6 @@ import type { StoryMessageRecipientsType } from '../types/Stories';
|
||||
import type { StoryDistributionIdString } from '../types/StoryDistributionId';
|
||||
import type { ServiceIdString } from '../types/ServiceId';
|
||||
import * as log from '../logging/log';
|
||||
import { DataWriter } from '../sql/Client';
|
||||
import { DAY } from './durations';
|
||||
import { StoryRecipientUpdateEvent } from '../textsecure/messageReceiverEvents';
|
||||
import {
|
||||
@@ -24,7 +23,6 @@ import { getMessageById } from '../messages/getMessageById';
|
||||
import { strictAssert } from './assert';
|
||||
import { repeat, zipObject } from './iterables';
|
||||
import { isOlderThan } from './timestamp';
|
||||
import { postSaveUpdates } from './cleanup';
|
||||
|
||||
export async function deleteStoryForEveryone(
|
||||
stories: ReadonlyArray<StoryDataType>,
|
||||
@@ -192,10 +190,8 @@ export async function deleteStoryForEveryone(
|
||||
await conversationJobQueue.add(jobData, async jobToInsert => {
|
||||
log.info(`${logId}: Deleting message with job ${jobToInsert.id}`);
|
||||
|
||||
await DataWriter.saveMessage(message.attributes, {
|
||||
await window.MessageCache.saveMessage(message.attributes, {
|
||||
jobToInsert,
|
||||
ourAci: window.textsecure.storage.user.getCheckedAci(),
|
||||
postSaveUpdates,
|
||||
});
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user