diff --git a/ts/sql/Server.ts b/ts/sql/Server.ts index 7ff0b690bc..39e662f5ea 100644 --- a/ts/sql/Server.ts +++ b/ts/sql/Server.ts @@ -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) {