Skip to content
Snippets Groups Projects
Verified Commit 6f285c5b authored by akwizgran's avatar akwizgran
Browse files

Transfer pending contact alias to contact.

parent a650d812
No related branches found
No related tags found
1 merge request!1124Transfer pending contact alias to contact
Pipeline #3456 passed
......@@ -84,10 +84,13 @@ class ContactManagerImpl implements ContactManager {
Author remote, AuthorId local, SecretKey rootKey, long timestamp,
boolean alice, boolean verified, boolean active)
throws DbException, GeneralSecurityException {
PublicKey theirPublicKey = db.getPendingContact(txn, p).getPublicKey();
PendingContact pendingContact = db.getPendingContact(txn, p);
db.removePendingContact(txn, p);
PublicKey theirPublicKey = pendingContact.getPublicKey();
ContactId c =
db.addContact(txn, remote, local, theirPublicKey, verified);
String alias = pendingContact.getAlias();
if (!alias.equals(remote.getName())) db.setContactAlias(txn, c, alias);
KeyPair ourKeyPair = identityManager.getHandshakeKeys(txn);
keyManager.addContact(txn, c, theirPublicKey, ourKeyPair);
keyManager.addRotationKeys(txn, c, rootKey, timestamp, alice, active);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment