diff --git a/src/main/java/envoy/server/processors/GroupMessageProcessor.java b/src/main/java/envoy/server/processors/GroupMessageProcessor.java index f62054e..725004e 100644 --- a/src/main/java/envoy/server/processors/GroupMessageProcessor.java +++ b/src/main/java/envoy/server/processors/GroupMessageProcessor.java @@ -8,6 +8,7 @@ import javax.persistence.EntityExistsException; import envoy.data.GroupMessage; import envoy.data.Message.MessageStatus; +import envoy.event.MessageStatusChange; import envoy.server.data.PersistenceManager; import envoy.server.net.ConnectionManager; import envoy.server.net.ObjectWriteProxy; @@ -42,12 +43,12 @@ public class GroupMessageProcessor implements ObjectProcessor { // sender, if he is still online. if (!groupMessage.getMemberStatuses().containsValue(MessageStatus.SENT)) { groupMessage.setStatus(MessageStatus.RECEIVED); -// if (connectionManager.isOnline(connectionManager.getUserIdBySocketID(socketID))) try { -// writeProxy.write(socketID, new MessageStatusChange(groupMessage)); -// } catch (IOException e) { -// logger.warning("Sender of the groupMessage online. Failed to send MessageStatusChange"); -// e.printStackTrace(); -// } + if (connectionManager.isOnline(connectionManager.getUserIdBySocketID(socketID))) try { + writeProxy.write(socketID, new MessageStatusChange(groupMessage)); + } catch (IOException e) { + logger.warning("Sender of the groupMessage online. Failed to send MessageStatusChange"); + e.printStackTrace(); + } } members.stream()