Purge key by keyID before persisting new key
This commit is contained in:
parent
d4c1e7ba06
commit
e09454242d
@ -88,7 +88,7 @@ class PublicKey {
|
||||
*/
|
||||
*_persisKey(key) {
|
||||
// delete old/unverified key
|
||||
yield this._mongo.remove({ fingerprint:key.fingerprint }, DB_TYPE);
|
||||
yield this._mongo.remove({ keyId:key.keyId }, DB_TYPE);
|
||||
// generate nonces for verification
|
||||
for (let uid of key.userIds) {
|
||||
uid.nonce = util.random();
|
||||
|
Loading…
Reference in New Issue
Block a user