Add information about whether Contact is active to ContactAddedEvent

This commit is contained in:
Torsten Grote
2016-02-29 13:15:11 -03:00
parent f44cb5ff94
commit 54f320465f
2 changed files with 8 additions and 2 deletions

View File

@@ -161,7 +161,7 @@ class DatabaseComponentImpl<T> implements DatabaseComponent {
if (db.containsContact(txn, remote.getId(), local))
throw new ContactExistsException();
ContactId c = db.addContact(txn, remote, local, active);
transaction.attach(new ContactAddedEvent(c));
transaction.attach(new ContactAddedEvent(c, active));
if (active) transaction.attach(new ContactStatusChangedEvent(c, true));
return c;
}