Simplify OutgoingIdentityKeyError, use it in getKeysForIdentifier

This commit is contained in:
Scott Nonnenberg 2022-02-25 15:39:24 -08:00 committed by GitHub
parent e4b4a0cd1e
commit fcb96bf92a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 33 deletions

View file

@ -1268,8 +1268,8 @@ async function fetchKeysForIdentifier(
});
window.Signal.Data.updateConversation(emptyConversation.attributes);
}
} catch (error) {
if (error.name === 'UnregisteredUserError') {
} catch (error: unknown) {
if (error instanceof UnregisteredUserError) {
await markIdentifierUnregistered(identifier);
return;
}