Set a contacts handshake public key on receiving one

This commit is contained in:
ameba23
2021-06-28 13:46:52 +02:00
parent 873b088a42
commit fad9257066

View File

@@ -159,6 +159,7 @@ public class HandshakeKeyExchangeManagerImpl extends ConversationClientImpl
return false;
}
PublicKey handshakePublicKey = new AgreementPublicKey(body.getRaw(0));
contactManager.setHandshakePublicKey(txn, contactId, handshakePublicKey);
return false;
}
@@ -194,6 +195,7 @@ public class HandshakeKeyExchangeManagerImpl extends ConversationClientImpl
private void sendHandshakePublicKey(Transaction txn, Contact c)
throws DbException {
LOG.info("Sending our handshake public key to " + c.getAlias());
Group group = getContactGroup(c);
GroupId g = group.getId();
if (!db.containsGroup(txn, g)) db.addGroup(txn, group);