Download attachments in separate queue from message processing
This commit is contained in:
@@ -602,6 +602,7 @@
|
||||
if (messageReceiver) {
|
||||
messageReceiver.close();
|
||||
}
|
||||
window.Signal.AttachmentDownloads.stop();
|
||||
}
|
||||
|
||||
let connectCount = 0;
|
||||
@@ -666,6 +667,11 @@
|
||||
messageReceiver.addEventListener('configuration', onConfiguration);
|
||||
messageReceiver.addEventListener('typing', onTyping);
|
||||
|
||||
window.Signal.AttachmentDownloads.start({
|
||||
getMessageReceiver: () => messageReceiver,
|
||||
logger: window.log,
|
||||
});
|
||||
|
||||
window.textsecure.messaging = new textsecure.MessageSender(
|
||||
USERNAME,
|
||||
PASSWORD
|
||||
@@ -1138,7 +1144,10 @@
|
||||
const { thumbnail } = queryFirst;
|
||||
|
||||
if (thumbnail && thumbnail.path) {
|
||||
firstAttachment.thumbnail = thumbnail;
|
||||
firstAttachment.thumbnail = {
|
||||
...thumbnail,
|
||||
copied: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1148,7 +1157,10 @@
|
||||
const { image } = queryFirst;
|
||||
|
||||
if (image && image.path) {
|
||||
firstAttachment.thumbnail = image;
|
||||
firstAttachment.thumbnail = {
|
||||
...image,
|
||||
copied: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user