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