addContact method which also takes a handshakePublicKey

This commit is contained in:
ameba23
2021-04-23 12:23:13 +02:00
parent f5455d320b
commit acb9b18507

View File

@@ -119,6 +119,15 @@ class ContactManagerImpl implements ContactManager, EventListener {
verified, active));
}
@Override
public ContactId addContact(Transaction txn, Author remote, AuthorId local,
PublicKey handshake, boolean verified) throws DbException {
ContactId c = db.addContact(txn, remote, local, handshake, verified);
Contact contact = db.getContact(txn, c);
for (ContactHook hook : hooks) hook.addingContact(txn, contact);
return c;
}
@Override
public String getHandshakeLink() throws DbException {
KeyPair keyPair = db.transactionWithResult(true,