-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
When adding a city with !add city Philadelphia, the bot only looks for submissions in the past 24 hours. If no submissions are found in that timeframe, it shows "ℹ️ No recent submissions found" and stops there.
Expected Behavior
If fewer than 5 submissions are found in the past day, the bot should fall back to showing the 5 most recent submissions regardless of date.
Current Behavior
- Bot only searches past 24 hours using
min_date_of_submission=yesterday - If no recent submissions found, shows "no recent submissions" message
- No fallback to older submissions
Root Cause
The issue is in src/notifier.py (lines 46-99) and src/api.py (lines 171-194):
fetch_submissions_for_coordinates()uses date filtering to only get past 24 hours- No secondary API call to fetch older submissions when recent ones are insufficient
Proposed Solution
- After fetching recent submissions (past 24 hours), check if count < 5
- If insufficient, make a second API call without date filtering to get older submissions
- Combine recent + older submissions to reach 5 total
- Update messages to indicate mixed timeframes if needed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels