From 4f7eff74e3cfb888bb5050801b829fde4b5ad2ee Mon Sep 17 00:00:00 2001 From: DieGurke <55625494+DieGurke@users.noreply.github.com> Date: Sat, 4 Jul 2020 15:59:48 +0200 Subject: [PATCH] Added pending MessageStatusChanges READ to Query --- src/main/java/envoy/server/data/GroupMessage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/server/data/GroupMessage.java b/src/main/java/envoy/server/data/GroupMessage.java index 7c61390..0cba412 100644 --- a/src/main/java/envoy/server/data/GroupMessage.java +++ b/src/main/java/envoy/server/data/GroupMessage.java @@ -25,7 +25,8 @@ import envoy.data.MessageBuilder; @NamedQuery( name = GroupMessage.getPendingGroupMsg, query = "SELECT m FROM GroupMessage m JOIN m.memberMessageStatus s WHERE (KEY(s) = :userId) AND ((m.creationDate > :lastSeen)" - + "OR ((m.status = envoy.data.Message$MessageStatus.RECEIVED) AND (m.receivedDate > :lastSeen)))" + + "OR ((m.status = envoy.data.Message$MessageStatus.RECEIVED) AND (m.receivedDate > :lastSeen))" + + "OR ((m.status = envoy.data.Message$MessageStatus.READ) AND (m.readDate > :lastSeen)))" ) public class GroupMessage extends Message {