Sending unread message as common messages instead of database messages
This commit is contained in:
parent
af865b77ad
commit
6a5680a19f
@ -66,8 +66,8 @@ public class LoginCredentialProcessor implements ObjectProcessor<LoginCredential
|
||||
System.out.println("Acquiring pending messages for the client...");
|
||||
List<Message> pendingMessages = PersistenceManager.getPersistenceManager().getUnreadMessages(user);
|
||||
for (Message msg : pendingMessages) {
|
||||
System.out.println("Sending message " + msg.toString());
|
||||
writeProxy.write(socketId, msg);
|
||||
System.out.println("Sending message " + msg.toCommonMessage().toString());
|
||||
writeProxy.write(socketId, msg.toCommonMessage());
|
||||
msg.setReceivedDate(new Date());
|
||||
msg.setStatus(MessageStatus.RECEIVED);
|
||||
PersistenceManager.getPersistenceManager().updateMessage(msg);
|
||||
|
Reference in New Issue
Block a user