mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
* feat(notifications): gate all notification endpoints behind PRO entitlement Notifications were accessible to any signed-in user. Now all notification API endpoints require tier >= 1 (Pro plan) with proper upgrade messaging and checkout flow integration. Backend: api/notification-channels.ts, api/notify.ts, api/slack/oauth/start.ts, api/discord/oauth/start.ts all check getEntitlements() and return 403 with upgradeUrl for free users. Frontend: preferences-content.ts shows upgrade CTA with Dodo checkout overlay instead of notification settings for non-Pro users. * fix(notifications): use hasTier(1) and handle null entitlement state Address Greptile review comments: 1. Replace isEntitled() with hasTier(1) to match backend tier check exactly 2. When entitlement state is null (not loaded yet), show full notification panel instead of upgrade CTA (backend enforces anyway)