Page MenuHomePhabricator

D8492.id32492.diff
No OneTemporary

D8492.id32492.diff

diff --git a/keyserver/src/fetchers/message-fetchers.js b/keyserver/src/fetchers/message-fetchers.js
--- a/keyserver/src/fetchers/message-fetchers.js
+++ b/keyserver/src/fetchers/message-fetchers.js
@@ -461,7 +461,9 @@
if (criteria.newerThan) {
globalTimeFilter = SQL`m.time > ${criteria.newerThan}`;
} else if (!criteria.threadCursors && shouldApplyTimeFilter) {
- globalTimeFilter = SQL`m.time > ${minMessageTime}`;
+ globalTimeFilter = SQL`
+ (m.time > ${minMessageTime} OR m.id = mm.last_message)
+ `;
}
const threadConditions = [];
@@ -470,7 +472,9 @@
shouldApplyTimeFilter &&
!globalTimeFilter
) {
- threadConditions.push(SQL`(mm.role > 0 AND m.time > ${minMessageTime})`);
+ threadConditions.push(SQL`
+ (mm.role > 0 AND (m.time > ${minMessageTime} OR m.id = mm.last_message))
+ `);
} else if (criteria.joinedThreads === true) {
threadConditions.push(SQL`mm.role > 0`);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 5:27 PM (20 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597393
Default Alt Text
D8492.id32492.diff (951 B)

Event Timeline