Merge pull request #639 from sachaaaaa/fix_prekey_id_not_found

Prevent prekeys to be deleted when re-sending pairing request
pull/643/head
sachaaaaa 6 years ago committed by GitHub
commit e0dc04cba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -444,12 +444,18 @@
window.log.info('clearing all sessions, prekeys, and signed prekeys'); window.log.info('clearing all sessions, prekeys, and signed prekeys');
await Promise.all([ await Promise.all([
store.clearPreKeyStore(),
store.clearContactPreKeysStore(), store.clearContactPreKeysStore(),
store.clearSignedPreKeysStore(),
store.clearContactSignedPreKeysStore(), store.clearContactSignedPreKeysStore(),
store.clearSessionStore(), store.clearSessionStore(),
]); ]);
// During secondary device registration we need to keep our prekeys sent
// to other pubkeys
if (textsecure.storage.get('secondaryDeviceStatus') !== 'ongoing') {
await Promise.all([
store.clearPreKeyStore(),
store.clearSignedPreKeysStore(),
]);
}
}, },
// Takes the same object returned by generateKeys // Takes the same object returned by generateKeys
async confirmKeys(keys) { async confirmKeys(keys) {

Loading…
Cancel
Save