Avoid crash in processing incoming message if timestamp is null
This commit is contained in:
parent
9375300691
commit
058feb317c
1 changed files with 4 additions and 0 deletions
|
@ -1305,6 +1305,10 @@ MessageReceiver.prototype.extend({
|
|||
// fields after the first action.
|
||||
|
||||
if (window.TIMESTAMP_VALIDATION) {
|
||||
if (!envelope.timestamp || !decrypted.timestamp) {
|
||||
throw new Error('Missing timestamp on dataMessage or envelope');
|
||||
}
|
||||
|
||||
const envelopeTimestamp = envelope.timestamp.toNumber();
|
||||
const decryptedTimestamp = decrypted.timestamp.toNumber();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue