Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3383728
D8492.id32492.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
951 B
Referenced Files
None
Subscribers
None
D8492.id32492.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8492: [keyserver] Always fetch the latest message for threads
Attached
Detach File
Event Timeline
Log In to Comment