Support PNI in QualifiedAddress.parse
This commit is contained in:
parent
0b629c9f70
commit
7bad05f5a0
3 changed files with 18 additions and 15 deletions
|
@ -48,6 +48,7 @@ const {
|
|||
|
||||
describe('SignalProtocolStore', () => {
|
||||
const ourAci = generateAci();
|
||||
const ourPni = generatePni();
|
||||
const theirAci = generateAci();
|
||||
let store: SignalProtocolStore;
|
||||
let identityKey: KeyPairType;
|
||||
|
@ -1385,6 +1386,21 @@ describe('SignalProtocolStore', () => {
|
|||
await store.archiveSiblingSessions(id.address, { zone });
|
||||
});
|
||||
|
||||
it('should not throw in archiveSession on PNI', async () => {
|
||||
const id = new QualifiedAddress(ourPni, new Address(theirAci, 1));
|
||||
|
||||
await store.storeSession(id, getSessionRecord(true));
|
||||
|
||||
await store.archiveSession(id);
|
||||
|
||||
const { devices, emptyServiceIds } = await store.getOpenDevices(ourPni, [
|
||||
theirAci,
|
||||
]);
|
||||
|
||||
assert.deepEqual(devices, []);
|
||||
assert.deepEqual(emptyServiceIds, [theirAci]);
|
||||
});
|
||||
|
||||
it('can be concurrently re-entered after waiting', async () => {
|
||||
const a = new Zone('a');
|
||||
const b = new Zone('b');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue