Ensure getLastConversationPreview
never returns expired messages
This commit is contained in:
parent
1b9d8dcb11
commit
48daaaa81d
1 changed files with 5 additions and 0 deletions
|
@ -4816,6 +4816,10 @@ function getLastConversationPreview({
|
|||
SELECT json FROM messages
|
||||
WHERE
|
||||
conversationId = $conversationId AND
|
||||
(
|
||||
expiresAt IS NULL OR
|
||||
(expiresAt > $now)
|
||||
) AND
|
||||
(
|
||||
type IS NULL
|
||||
OR
|
||||
|
@ -4841,6 +4845,7 @@ function getLastConversationPreview({
|
|||
).get({
|
||||
conversationId,
|
||||
ourConversationId,
|
||||
now: Date.now(),
|
||||
});
|
||||
|
||||
if (!row) {
|
||||
|
|
Loading…
Reference in a new issue