app->make(NotificationTypeRegistry::class)->register(new NotificationTypeDefinition( key: 'group.membership_approved', label: 'Your group membership request was approved', template: 'Your request to join the group ":groupName" has been approved', mailNotification: GroupMembershipApprovedNotification::class, // Preserves current behavior: this was previously sent // unconditionally whenever Setting::EmailNotificationsEnabled // was on, with no per-user opt-out — default the preference // to "on" so existing users see no change unless they // explicitly opt out. defaultEmailEnabled: true, )); } }