- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Currently, the bot sends reminder emails multiple times even after a user has completed the LeetCode Problem of the Day (POTD).
This can lead to spammy notifications and redundant communication.
Expected Behavior:
Once a user successfully completes the POTD, the bot should send the “Congratulations” email only once for that day, and skip any further reminders until the next day’s problem is released.
Steps to Reproduce:
- Add a user in users.json who completes the POTD.
- Wait for the bot’s next scheduled run.
- Observe that the bot sends multiple reminder/congrats emails even after completion.
Proposed Solution:
- Track each user’s daily completion status using a temporary flag or cache (e.g., in-memory dictionary or local JSON).
- Before sending an email, check if the user has already been marked as “completed” for the current date.
- Reset completion flags at midnight (IST/UTC).
Acceptance Criteria:
✅ Only one “Congratulations” email is sent per user per day.
✅ No further reminders sent after completion.
✅ Flags reset correctly for the next day’s POTD.
Environment:
Docker container or local dev
Python 3.10+
Deployed on: GHCR
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed