getProfile errors shouldn't stop group update
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
5ccfbc4aea
commit
63c7f9fd52
19
ts/groups.ts
19
ts/groups.ts
|
@ -2734,12 +2734,19 @@ async function updateGroup(
|
|||
const profileFetchQueue = new PQueue({
|
||||
concurrency: 3,
|
||||
});
|
||||
await profileFetchQueue.addAll(
|
||||
contactsWithoutProfileKey.map(contact => () => {
|
||||
const active = contact.getActiveProfileFetch();
|
||||
return active || contact.getProfiles();
|
||||
})
|
||||
);
|
||||
try {
|
||||
await profileFetchQueue.addAll(
|
||||
contactsWithoutProfileKey.map(contact => () => {
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue