Message Requests: Show blurhash for pending stickers

This commit is contained in:
Scott Nonnenberg 2020-11-12 13:22:40 -08:00 committed by GitHub
parent 0c6f4248f3
commit 2977c0ca3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 9 deletions

View file

@ -1299,7 +1299,17 @@ export class ConversationModel extends window.Backbone.Model<
}
// eslint-disable-next-line no-await-in-loop
await Promise.all(readMessages.map(m => m.queueAttachmentDownloads()));
await Promise.all(
readMessages.map(async m => {
const registered = window.MessageController.register(m.id, m);
const shouldSave = await registered.queueAttachmentDownloads();
if (shouldSave) {
await window.Signal.Data.saveMessage(registered.attributes, {
Message: window.Whisper.Message,
});
}
})
);
} while (messages.length > 0);
}