Optimize a few queries

This commit is contained in:
Scott Nonnenberg
2021-12-20 13:04:02 -08:00
committed by GitHub
parent b08691b35b
commit 60a53656af
27 changed files with 1288 additions and 186 deletions

View File

@@ -1716,6 +1716,7 @@ export async function createGroupV2({
};
await window.Signal.Data.saveMessages([createdTheGroupMessage], {
forceSave: true,
ourUuid,
});
const model = new window.Whisper.Message(createdTheGroupMessage);
window.MessageController.register(model.id, model);
@@ -2861,6 +2862,7 @@ async function updateGroup(
if (changeMessagesToSave.length > 0) {
await window.Signal.Data.saveMessages(changeMessagesToSave, {
forceSave: true,
ourUuid: ourUuid.toString(),
});
changeMessagesToSave.forEach(changeMessage => {
const model = new window.Whisper.Message(changeMessage);