Add a method to set a contacts handshake public key in the database

This commit is contained in:
ameba23
2021-06-28 13:46:19 +02:00
parent c7bca253fe
commit 873b088a42
6 changed files with 65 additions and 0 deletions

View File

@@ -209,6 +209,16 @@ public interface ContactManager {
void setContactAlias(ContactId c, @Nullable String alias)
throws DbException;
/**
* Sets the contact's handshake public key
*/
void setHandshakePublicKey(Transaction txn, ContactId c, PublicKey handshakePublicKey) throws DbException;
/**
* Sets the contact's handshake public key
*/
void setHandshakePublicKey(ContactId c, PublicKey handshakePublicKey) throws DbException;
/**
* Returns true if a contact with this {@code remoteAuthorId} belongs to
* the local pseudonym with this {@code localAuthorId}.

View File

@@ -546,6 +546,11 @@ public interface DatabaseComponent extends TransactionManager {
void setContactAlias(Transaction txn, ContactId c, @Nullable String alias)
throws DbException;
/**
* Sets the remote handshake public key for a given contact
*/
void setHandshakePublicKey(Transaction txn, ContactId c, PublicKey handshakePublicKey) throws DbException;
/**
* Sets the given group's visibility to the given contact.
*/