Added pending MessageStatusChanges READ to Query

This commit is contained in:
DieGurke 2020-07-04 15:59:48 +02:00
parent 39696ca671
commit 4cbd724203

View File

@ -25,7 +25,8 @@ import envoy.data.MessageBuilder;
@NamedQuery( @NamedQuery(
name = GroupMessage.getPendingGroupMsg, name = GroupMessage.getPendingGroupMsg,
query = "SELECT m FROM GroupMessage m JOIN m.memberMessageStatus s WHERE (KEY(s) = :userId) AND ((m.creationDate > :lastSeen)" 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 { public class GroupMessage extends Message {