sendToGroup: Flow errors during key-fetching back up to original sender
This commit is contained in:
parent
58e3dd9028
commit
3601279287
2 changed files with 17 additions and 2 deletions
|
@ -41,9 +41,12 @@ export async function getKeysForIdentifier(
|
|||
if (theirUuid) {
|
||||
await window.textsecure.storage.protocol.archiveAllSessions(theirUuid);
|
||||
}
|
||||
}
|
||||
|
||||
throw new UnregisteredUserError(identifier, error);
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async function getServerKeys(
|
||||
|
|
|
@ -168,7 +168,18 @@ export async function sendContentMessageToGroup({
|
|||
sendType,
|
||||
timestamp,
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (error: unknown) {
|
||||
if (!(error instanceof Error)) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (error.name.includes('untrusted identity')) {
|
||||
log.error(
|
||||
`sendToGroup/${logId}: Failed with 'untrusted identity' error, re-throwing`
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
|
||||
log.error(
|
||||
`sendToGroup/${logId}: Sender Key send failed, logging, proceeding to normal send`,
|
||||
error && error.stack ? error.stack : error
|
||||
|
@ -1084,6 +1095,7 @@ async function fetchKeysForIdentifiers(
|
|||
'fetchKeysForIdentifiers: Failed to fetch keys:',
|
||||
error && error.stack ? error.stack : error
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue