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
All notifications are currently sent unconditionally — members receive emails and in-app alerts regardless of their preferences. Notification fatigue drives members to ignore all alerts. Per-type, per-channel preference controls are a standard expectation on any platform.
Update CreateNotificationProvider: before creating an in-app notification, fetch the user's NotificationPreference and skip if inAppEnabled = false or the relevant category toggle is off
Add a preference check helper notificationPreferencesService.shouldSend(userId, type, channel) for use in EmailModule callers
Overview
All notifications are currently sent unconditionally — members receive emails and in-app alerts regardless of their preferences. Notification fatigue drives members to ignore all alerts. Per-type, per-channel preference controls are a standard expectation on any platform.
Context
CreateNotificationProvider:backend/src/notifications/providers/create-notification.provider.tsEmailModule:backend/src/email/— all email sends need preference checksNotificationTypeenum:backend/src/notifications/enums/notification-type.enum.tsTasks
NotificationPreferenceentity:id,userId(unique FK),bookingUpdates(bool, default true),paymentAlerts(bool, default true),communityMessages(bool, default true),announcements(bool, default true),eventReminders(bool, default true),waitlistAlerts(bool, default true),emailEnabled(bool, default true),inAppEnabled(bool, default true),smsEnabled(bool, default false),pushEnabled(bool, default true),updatedAtGET /notifications/preferences— returns current user's preferences; auto-creates a default record if none exists yetPATCH /notifications/preferences— partial update (e.g.{ "announcements": false, "emailEnabled": false })CreateNotificationProvider: before creating an in-app notification, fetch the user'sNotificationPreferenceand skip ifinAppEnabled = falseor the relevant category toggle is offnotificationPreferencesService.shouldSend(userId, type, channel)for use inEmailModulecallersFiles to Modify / Create
backend/src/notifications/entities/notification-preference.entity.tsbackend/src/notifications/providers/notification-preferences.provider.tsbackend/src/notifications/notifications.controller.tsbackend/src/notifications/providers/create-notification.provider.ts