Sending unread message as common messages instead of database messages
This commit is contained in:
parent
79d11f4fba
commit
f11ed4a585
@ -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