Reimplemented RECEIVED update sending to sender

This commit is contained in:
DieGurke 2020-07-05 13:28:48 +02:00
parent 8ba70407af
commit 83ddc02187

View File

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