Removed unnecessary TODO

This commit is contained in:
Kai S. K. Engelbart 2020-02-11 18:15:19 +01:00
parent 2b1adad1ec
commit b625aa33b4

View File

@ -32,8 +32,7 @@ public class ContactOperationProcessor implements ObjectProcessor<ContactOperati
System.out.printf("Adding user %s to the contact list of user %d.%n", evt.get(), userId); System.out.printf("Adding user %s to the contact list of user %d.%n", evt.get(), userId);
PersistenceManager.getPersistenceManager().addContact(userId, contactId); PersistenceManager.getPersistenceManager().addContact(userId, contactId);
// Notify the contact // Notify the contact if online
// TODO: cache notification for offline mode
if (ConnectionManager.getInstance().isOnline(contactId)) writeProxy.write(connectionManager.getSocketId(contactId), if (ConnectionManager.getInstance().isOnline(contactId)) writeProxy.write(connectionManager.getSocketId(contactId),
new Contacts(Arrays.asList(PersistenceManager.getPersistenceManager().getUserById(userId).toCommonUser()))); new Contacts(Arrays.asList(PersistenceManager.getPersistenceManager().getUserById(userId).toCommonUser())));
break; break;