Call KeyManager#AddContact when restoring contacts

This commit is contained in:
ameba23
2021-06-29 11:43:14 +02:00
parent eb66a13ded
commit 4b9c3a1a96
4 changed files with 17 additions and 4 deletions

View File

@@ -95,6 +95,8 @@ public class HandshakeKeyExchangeManagerImpl extends ConversationClientImpl
for (Contact c : db.getContacts(txn)) {
if (c.getHandshakePublicKey() == null) {
sendHandshakePublicKey(txn, c);
} else {
LOG.info("Have pk for contact " + c.getAuthor().getName());
}
}
}
@@ -194,6 +196,8 @@ public class HandshakeKeyExchangeManagerImpl extends ConversationClientImpl
if (c.getHandshakePublicKey() == null) {
sendHandshakePublicKey(txn, c);
} else {
LOG.info("Have pk for contact " + c.getAuthor().getName());
}
}

View File

@@ -184,6 +184,9 @@ public class RestoreAccountImpl implements RestoreAccount {
} catch (DbException e) {
LOG.warning("Error adding contacts to database");
LOG.warning(e.getMessage());
} catch (GeneralSecurityException e) {
LOG.warning("Error adding handshake key");
LOG.warning(e.getMessage());
}
LOG.info("Added all contacts");
}