Don't reset session if sealed sender wrapper is invalid

This commit is contained in:
Scott Nonnenberg 2021-05-13 16:32:27 -07:00
parent 8fa5ea6b2b
commit 4c249ce5dc

View file

@ -1185,6 +1185,15 @@ class MessageReceiverInner extends EventTarget {
throw error;
}
// We don't do a light session reset if it's an error with the sealed sender
// wrapper, since we don't trust the sender information.
if (
error?.message?.includes &&
error.message.includes('trust root validation failed')
) {
throw error;
}
if (uuid && deviceId) {
await this.maybeLightSessionReset(uuid, deviceId);
} else {