Fixed error regarding notSerializable exception
This commit is contained in:
parent
a34e90adb8
commit
5d0cc7e84c
@ -1,6 +1,7 @@
|
|||||||
package envoy.server.data;
|
package envoy.server.data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
@ -73,7 +74,7 @@ public class GroupMessage extends Message {
|
|||||||
.setForwarded(forwarded)
|
.setForwarded(forwarded)
|
||||||
.setStatus(status)
|
.setStatus(status)
|
||||||
.setText(text)
|
.setText(text)
|
||||||
.buildGroupMessage((envoy.data.Group) recipient.toCommon(), memberMessageStatus);
|
.buildGroupMessage((envoy.data.Group) recipient.toCommon(), new HashMap<>(memberMessageStatus));
|
||||||
groupMessage.setReceivedDate(receivedDate);
|
groupMessage.setReceivedDate(receivedDate);
|
||||||
groupMessage.setReadDate(readDate);
|
groupMessage.setReadDate(readDate);
|
||||||
return groupMessage;
|
return groupMessage;
|
||||||
|
@ -145,9 +145,10 @@ public final class LoginCredentialProcessor implements ObjectProcessor<LoginCred
|
|||||||
for (GroupMessage gmsg : pendingGroupMessages) {
|
for (GroupMessage gmsg : pendingGroupMessages) {
|
||||||
if (gmsg.getMemberMessageStatus().get(user.getID()) == MessageStatus.SENT) {
|
if (gmsg.getMemberMessageStatus().get(user.getID()) == MessageStatus.SENT) {
|
||||||
gmsg.getMemberMessageStatus().replace(user.getID(), MessageStatus.RECEIVED);
|
gmsg.getMemberMessageStatus().replace(user.getID(), MessageStatus.RECEIVED);
|
||||||
logger.info("Sending groupMessage" + gmsg.toCommon());
|
envoy.data.GroupMessage groupMessage = gmsg.toCommon();
|
||||||
System.out.println(gmsg.toCommon().toString());
|
logger.info("Sending groupMessage" + groupMessage);
|
||||||
writeProxy.write(socketID, gmsg.toCommon());
|
System.out.println(groupMessage.toString());
|
||||||
|
writeProxy.write(socketID, groupMessage);
|
||||||
// Sending memberStatusEvent to all members (event does not exist yet I think)
|
// Sending memberStatusEvent to all members (event does not exist yet I think)
|
||||||
if (!gmsg.getMemberMessageStatus().containsValue(MessageStatus.SENT)) {
|
if (!gmsg.getMemberMessageStatus().containsValue(MessageStatus.SENT)) {
|
||||||
gmsg.setStatus(MessageStatus.RECEIVED);
|
gmsg.setStatus(MessageStatus.RECEIVED);
|
||||||
|
Reference in New Issue
Block a user