Add 'verified' flag to ContactAddedEvent.

This commit is contained in:
akwizgran
2019-05-27 11:40:28 +01:00
parent 677728b9ae
commit 14e604e21e
10 changed files with 35 additions and 57 deletions

View File

@@ -244,7 +244,7 @@ class DatabaseComponentImpl<T> implements DatabaseComponent {
if (db.containsContact(txn, remote.getId(), local))
throw new ContactExistsException(local, remote);
ContactId c = db.addContact(txn, remote, local, verified);
transaction.attach(new ContactAddedEvent(c));
transaction.attach(new ContactAddedEvent(c, verified));
return c;
}
@@ -265,7 +265,7 @@ class DatabaseComponentImpl<T> implements DatabaseComponent {
ContactId c = db.addContact(txn, remote, local, verified);
db.transferKeys(txn, p, c);
db.removePendingContact(txn, p);
transaction.attach(new ContactAddedEvent(c));
transaction.attach(new ContactAddedEvent(c, verified));
transaction.attach(new PendingContactRemovedEvent(p));
return c;
}

View File

@@ -153,7 +153,7 @@ public class PollerImplTest extends BrambleMockTestCase {
will(returnValue(false));
}});
poller.eventOccurred(new ContactAddedEvent(contactId));
poller.eventOccurred(new ContactAddedEvent(contactId, true));
}
@Test