You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(payments): per-plan event rate limits and retention #921
Is your feature request related to a problem? Please describe.
Rate limits (limits.event.rateLimits) and retention (limits.event.retention) are global, so a paying subscriber on a premium plan gets the same limits as everyone else. Tiered access (#673) needs these to depend on the sender's active plan.
Describe the solution you'd like
Plans can define their own event rate limits; EventMessageHandler.isRateLimited uses the plan's set for a subscriber and the global set otherwise, keyed the same way as today.
Plans can define their own retention (maxDays); the maintenance purge applies it per subscriber instead of one global value, keeping the existing kind/pubkey whitelists.
The plan lookup reuses the admission cache so no extra database read happens per event.
Documentation in CONFIGURATION.md and tests for both limit paths, including expiry falling back to the global limits.
Activity
feat(payments): add per-plan event rate limits and retention (cameri#922