Change order of syncs during linking
This commit is contained in:
parent
4f869e7900
commit
3b4106d9dd
5 changed files with 142 additions and 90 deletions
|
@ -2610,7 +2610,7 @@ export default class MessageReceiver
|
|||
envelope: ProcessedEnvelope,
|
||||
contacts: Proto.SyncMessage.IContacts
|
||||
): Promise<void> {
|
||||
log.info('contact sync');
|
||||
log.info('MessageReceiver: handleContacts');
|
||||
const { blob } = contacts;
|
||||
if (!blob) {
|
||||
throw new Error('MessageReceiver.handleContacts: blob field was missing');
|
||||
|
@ -2631,11 +2631,11 @@ export default class MessageReceiver
|
|||
contactDetails = contactBuffer.next();
|
||||
}
|
||||
|
||||
const finalEvent = new ContactSyncEvent();
|
||||
results.push(this.dispatchAndWait(finalEvent));
|
||||
|
||||
await Promise.all(results);
|
||||
|
||||
const finalEvent = new ContactSyncEvent();
|
||||
await this.dispatchAndWait(finalEvent);
|
||||
|
||||
log.info('handleContacts: finished');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue