Skip to content

Feat/notification throttling#484

Merged
LaGodxy merged 2 commits into
MettaChain:mainfrom
mijinummi:feat/notification-throttling
Apr 25, 2026
Merged

Feat/notification throttling#484
LaGodxy merged 2 commits into
MettaChain:mainfrom
mijinummi:feat/notification-throttling

Conversation

@mijinummi
Copy link
Copy Markdown
Contributor

Pull Request: Implement Notification Throttling

Overview

This PR implements issue #379 Implement Notification Throttling.
It prevents notification spam by adding rate limits, grouping, cooldown periods, and user controls.


Changes Introduced

  • Added notification-throttle.util.ts for throttling logic.
  • Created NotificationPreferences model for user controls.
  • Updated notification.service.ts to enforce throttling.
  • Added /notifications/preferences endpoint for user configuration.
  • Structured logs for throttling events.

Acceptance Criteria ✅

  • Rate limits enforced
  • Cooldown period applied
  • Grouping supported
  • User controls available
  • Logs record throttling events

How to Test

  1. Send >10 notifications in an hour → throttled.
  2. Send notifications within cooldown → throttled.
  3. Update preferences via /notifications/preferences → new limits applied.
  4. Check logs → throttling events recorded.

Contribution Notes

@LaGodxy LaGodxy merged commit 4d004df into MettaChain:main Apr 25, 2026
3 of 4 checks passed
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.

Implement Notification Throttling

2 participants