Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Implement notification frequency limits #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

chinhld12
Copy link
Collaborator

@chinhld12 chinhld12 commented Apr 14, 2025

  • To prevent users from being spammed by frequent, repetitive notifications

Any background context you want to provide? (if appropriate)

Note: The EventData queries will take by start of today for resetting interval for each day

  1. Initial Interval: Start with your current 30-minute interval.
  2. Multiplier: Define a multiplier (e.g., 2).
  3. Next Interval: After the first reminder, the next interval becomes the initial interval multiplied by the multiplier (e.g., 30 minutes * 2 = 60 minutes).
  4. Subsequent Intervals: Each subsequent interval is the previous interval multiplied by the multiplier (e.g., 60 minutes * 2 = 120 minutes, then 120 minutes * 2 = 240 minutes, and so on).
  5. Maximum Interval (Cap): Set a maximum interval you're comfortable with (e.g., 4 hours, 6 hours, 12 hours). Once the calculated interval reaches this maximum, it stays there.

Example Sequence (Initial: 30 min, Multiplier: 2, Cap: 4 hours):

  • Reminder 1: After 30 minutes
  • Reminder 2: After another 60 minutes (total 90 minutes from start)
  • Reminder 3: After another 120 minutes (total 210 minutes from start)
  • Reminder 4: After another 240 minutes (total 450 minutes from start)
  • Reminder 5 onwards: Every 240 minutes (4 hours)

@chinhld12 chinhld12 changed the title feat: add interval period for notify feat: Implement notification frequency limits Apr 14, 2025
@chinhld12 chinhld12 force-pushed the feat/add-interval-period-timing branch from edbb3df to adf8632 Compare April 14, 2025 08:44
@chinhld12 chinhld12 marked this pull request as ready for review April 15, 2025 02:16
@chinhld12 chinhld12 requested a review from zlatanpham April 15, 2025 02:16
@chinhld12 chinhld12 force-pushed the main branch 2 times, most recently from 2494581 to 5065ad8 Compare April 18, 2025 10:58
@chinhld12 chinhld12 force-pushed the feat/add-interval-period-timing branch from adf8632 to f6b77f2 Compare April 21, 2025 08:49
@chinhld12 chinhld12 force-pushed the feat/add-interval-period-timing branch from f6b77f2 to 8f51a52 Compare April 21, 2025 10:10
@chinhld12 chinhld12 merged commit 8fc578b into main Apr 22, 2025
1 check passed
@chinhld12 chinhld12 deleted the feat/add-interval-period-timing branch April 22, 2025 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants