getProfile errors shouldn't stop group update

This commit is contained in:
Fedor Indutny
2022-03-22 12:00:31 -07:00
committed by GitHub
parent 2ccd425ae2
commit 926a04d045

View File

@@ -2879,12 +2879,19 @@ async function updateGroup(
const profileFetchQueue = new PQueue({ const profileFetchQueue = new PQueue({
concurrency: 3, concurrency: 3,
}); });
await profileFetchQueue.addAll( try {
contactsWithoutProfileKey.map(contact => () => { await profileFetchQueue.addAll(
const active = contact.getActiveProfileFetch(); contactsWithoutProfileKey.map(contact => () => {
return active || contact.getProfiles(); const active = contact.getActiveProfileFetch();
}) return active || contact.getProfiles();
); })
);
} catch (error) {
log.error(
`updateGroup/${logId}: failed to fetch missing profiles`,
Errors.toLogFormat(error)
);
}
} }
if (changeMessagesToSave.length > 0) { if (changeMessagesToSave.length > 0) {