Store receivedAtCounter separately for unprocessed

This commit is contained in:
Fedor Indutny 2022-03-24 14:28:56 -07:00 committed by GitHub
parent 0f5a01f2b2
commit ca3f8b7df0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 50 additions and 4 deletions

View file

@ -1482,6 +1482,7 @@ describe('SignalProtocolStore', () => {
id: '2-two',
envelope: 'second',
timestamp: Date.now() + 2,
receivedAtCounter: 0,
version: 2,
attempts: 0,
},
@ -1536,6 +1537,7 @@ describe('SignalProtocolStore', () => {
id: '2-two',
envelope: 'second',
timestamp: 2,
receivedAtCounter: 0,
version: 2,
attempts: 0,
},
@ -1655,6 +1657,7 @@ describe('SignalProtocolStore', () => {
id: '0-dropped',
envelope: 'old envelope',
timestamp: NOW - 2 * durations.MONTH,
receivedAtCounter: 0,
version: 2,
attempts: 0,
}),
@ -1662,6 +1665,7 @@ describe('SignalProtocolStore', () => {
id: '2-two',
envelope: 'second',
timestamp: NOW + 2,
receivedAtCounter: 0,
version: 2,
attempts: 0,
}),
@ -1669,6 +1673,7 @@ describe('SignalProtocolStore', () => {
id: '3-three',
envelope: 'third',
timestamp: NOW + 3,
receivedAtCounter: 0,
version: 2,
attempts: 0,
}),
@ -1676,6 +1681,7 @@ describe('SignalProtocolStore', () => {
id: '1-one',
envelope: 'first',
timestamp: NOW + 1,
receivedAtCounter: 0,
version: 2,
attempts: 0,
}),
@ -1696,6 +1702,7 @@ describe('SignalProtocolStore', () => {
id,
envelope: 'first',
timestamp: NOW + 1,
receivedAtCounter: 0,
version: 2,
attempts: 0,
});
@ -1713,6 +1720,7 @@ describe('SignalProtocolStore', () => {
id,
envelope: 'first',
timestamp: NOW + 1,
receivedAtCounter: 0,
version: 2,
attempts: 0,
});