mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Don't allow local identities to be added as contacts.
This commit is contained in:
@@ -157,6 +157,8 @@ class DatabaseComponentImpl<T> implements DatabaseComponent {
|
||||
T txn = unbox(transaction);
|
||||
if (!db.containsLocalAuthor(txn, local))
|
||||
throw new NoSuchLocalAuthorException();
|
||||
if (db.containsLocalAuthor(txn, remote.getId()))
|
||||
throw new ContactExistsException();
|
||||
if (db.containsContact(txn, remote.getId(), local))
|
||||
throw new ContactExistsException();
|
||||
ContactId c = db.addContact(txn, remote, local, active);
|
||||
|
||||
Reference in New Issue
Block a user