Fixed Bug Regarding Incorrect Pending MessageStatuses in LoginCredentialsProcessor (#61)

Merge branch 'develop' into b/fixing_message_bugs

fixed not receiving pending messageStatus bug

Co-authored-by: delvh <leon@kske.dev>
Reviewed-on: https://git.kske.dev/zdm/envoy/pulls/61
Reviewed-by: kske <kai@kske.dev>
Reviewed-by: delvh <leon@kske.dev>
This commit is contained in:
Maximilian P. Käfer 2020-09-27 15:55:59 +02:00
parent c7ee545ee2
commit 829e94fa5f

View File

@ -205,8 +205,8 @@ public final class LoginCredentialProcessor implements ObjectProcessor<LoginCred
} }
// Deliver just a status change instead of the whole message // Deliver just a status change instead of the whole message
if (gmsg.getStatus() == SENT && user.getLastSeen().isBefore(gmsg.getCreationDate()) if (gmsg.getStatus() == RECEIVED && user.getLastSeen().isBefore(gmsg.getReceivedDate())
|| gmsg.getStatus() == RECEIVED && user.getLastSeen().isBefore(gmsg.getReceivedDate())) || gmsg.getStatus() == READ && user.getLastSeen().isBefore(gmsg.getReadDate()))
writeProxy.write(socketID, new MessageStatusChange(gmsgCommon)); writeProxy.write(socketID, new MessageStatusChange(gmsgCommon));
} }
} }