Broadcast status event when active contact is added.

This commit is contained in:
akwizgran
2016-02-19 12:10:44 +00:00
parent 0f1dc554bd
commit 8a20f330be
2 changed files with 6 additions and 0 deletions

View File

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