diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 2c9fa0aeb..f456c6a77 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38122,10 +38122,14 @@ var TextSecureServer = (function() { // update our own identity key, which may have changed // if we're relinking after a reinstall on the master device - var putIdentity = textsecure.storage.protocol.saveIdentity.bind( - null, number, identityKeyPair.pubKey, true, true - ); - textsecure.storage.protocol.removeIdentityKey(number).then(putIdentity, putIdentity); + textsecure.storage.protocol.saveIdentityWithAttributes({ + id : number, + publicKey : identityKeyPair.pubKey, + firstUse : true, + timestamp : Date.now(), + verified : textsecure.storage.protocol.VerifiedStatus.VERIFIED, + nonblockingApproval : true + }); textsecure.storage.put('identityKey', identityKeyPair); textsecure.storage.put('signaling_key', signalingKey); diff --git a/libtextsecure/account_manager.js b/libtextsecure/account_manager.js index ad0a43a03..b12c09ccd 100644 --- a/libtextsecure/account_manager.js +++ b/libtextsecure/account_manager.js @@ -203,10 +203,14 @@ // update our own identity key, which may have changed // if we're relinking after a reinstall on the master device - var putIdentity = textsecure.storage.protocol.saveIdentity.bind( - null, number, identityKeyPair.pubKey, true, true - ); - textsecure.storage.protocol.removeIdentityKey(number).then(putIdentity, putIdentity); + textsecure.storage.protocol.saveIdentityWithAttributes({ + id : number, + publicKey : identityKeyPair.pubKey, + firstUse : true, + timestamp : Date.now(), + verified : textsecure.storage.protocol.VerifiedStatus.VERIFIED, + nonblockingApproval : true + }); textsecure.storage.put('identityKey', identityKeyPair); textsecure.storage.put('signaling_key', signalingKey);