Remove filter from ReceivedMessageProcessor, improve handshake

The user is sent after the messages to avoid receiving messages on the
client while switching from handshake to normal mode.
This commit is contained in:
2020-07-16 21:14:37 +02:00
parent 43c1edae39
commit afcf1e48a4
3 changed files with 11 additions and 17 deletions

View File

@ -110,10 +110,6 @@ public final class LoginCredentialProcessor implements ObjectProcessor<LoginCred
logger.info(user + " successfully authenticated.");
connectionManager.registerUser(user.getID(), socketID);
// Change status and notify contacts about it
user.setStatus(ONLINE);
UserStatusChangeProcessor.updateUserStatus(user);
// Complete the handshake
writeProxy.write(socketID, user.toCommon());
@ -190,6 +186,10 @@ public final class LoginCredentialProcessor implements ObjectProcessor<LoginCred
writeProxy.write(socketID, new MessageStatusChange(gmsgCommon));
}
}
// Change status and notify contacts about it
user.setStatus(ONLINE);
UserStatusChangeProcessor.updateUserStatus(user);
}
@Override