website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* based on their preferences.
|
||||
*/
|
||||
|
||||
import { NotificationChannel, NotificationType } from '@/notifications/domain/types/NotificationTypes';
|
||||
import { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import type { Logger } from '@core/shared/domain/Logger';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
@@ -13,6 +13,8 @@ import { v4 as uuid } from 'uuid';
|
||||
import type { NotificationData } from '../../domain/entities/Notification';
|
||||
import { Notification } from '../../domain/entities/Notification';
|
||||
import type { NotificationDeliveryResult, NotificationGatewayRegistry } from '../ports/NotificationGateway';
|
||||
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
|
||||
import { NotificationPreferenceRepository } from '../../domain/repositories/NotificationPreferenceRepository';
|
||||
|
||||
export interface SendNotificationCommand {
|
||||
recipientId: string;
|
||||
@@ -93,7 +95,7 @@ export class SendNotificationUseCase {
|
||||
|
||||
// Check quiet hours (skip external channels during quiet hours)
|
||||
const effectiveChannels = preferences.isInQuietHours()
|
||||
? channels.filter(ch => ch === 'in_app')
|
||||
? channels.filter((ch: NotificationChannel) => ch === 'in_app')
|
||||
: channels;
|
||||
|
||||
// Ensure at least in_app is used
|
||||
|
||||
Reference in New Issue
Block a user