Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion api/v1_notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ WHERE
)
)
AND (
(@timestamp_offset = 0 AND @group_id_offset = '') OR
-- Initial load: bound to the last 90 days so heavy users don't fan out
-- over their entire notification history. Pagination (timestamp_offset > 0)
-- is unbounded so scrolling further back still works.
(@timestamp_offset = 0 AND @group_id_offset = '' AND n.timestamp > (now()::timestamp - interval '90 days')) OR
(@timestamp_offset = 0 AND @group_id_offset != '' AND n.group_id < @group_id_offset) OR
(@timestamp_offset > 0 AND n.timestamp < to_timestamp(@timestamp_offset)) OR
(
Expand Down
Loading