mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 03:11:15 -05:00
Fix silent polling filter
This commit is contained in:
@@ -207,9 +207,11 @@ export const ModerationQueue = forwardRef<ModerationQueueRef>((props, ref) => {
|
||||
submissionsQuery = submissionsQuery.neq('submission_type', 'photo');
|
||||
}
|
||||
|
||||
// Silent polling: only fetch submissions created/updated since last poll
|
||||
// Silent polling: fetch submissions created OR updated since last poll
|
||||
if (silent && lastFetchTimestampRef.current) {
|
||||
submissionsQuery = submissionsQuery.gt('submitted_at', lastFetchTimestampRef.current);
|
||||
submissionsQuery = submissionsQuery.or(
|
||||
`submitted_at.gt.${lastFetchTimestampRef.current},updated_at.gt.${lastFetchTimestampRef.current}`
|
||||
);
|
||||
}
|
||||
|
||||
// CRM-style claim filtering: moderators only see unclaimed OR self-assigned submissions
|
||||
|
||||
Reference in New Issue
Block a user