Improve message download performance
This commit is contained in:
parent
957f6f6474
commit
0c09f9620f
32 changed files with 906 additions and 633 deletions
|
@ -166,9 +166,11 @@ async function _runJob(job) {
|
|||
);
|
||||
}
|
||||
|
||||
const found = await getMessageById(messageId, {
|
||||
Message: Whisper.Message,
|
||||
});
|
||||
const found =
|
||||
MessageController.getById(messageId) ||
|
||||
(await getMessageById(messageId, {
|
||||
Message: Whisper.Message,
|
||||
}));
|
||||
if (!found) {
|
||||
logger.error('_runJob: Source message not found, deleting job');
|
||||
await _finishJob(null, id);
|
||||
|
@ -434,13 +436,7 @@ async function _addAttachmentToMessage(message, attachment, { type, index }) {
|
|||
hash: await computeHash(loadedAttachment.data),
|
||||
},
|
||||
});
|
||||
await Signal.Data.updateConversation(
|
||||
conversationId,
|
||||
conversation.attributes,
|
||||
{
|
||||
Conversation: Whisper.Conversation,
|
||||
}
|
||||
);
|
||||
Signal.Data.updateConversation(conversationId, conversation.attributes);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue