diff --git a/lib/services/notifications/leantime-adapter.ts b/lib/services/notifications/leantime-adapter.ts index fa680c26..7d9c4ca4 100644 --- a/lib/services/notifications/leantime-adapter.ts +++ b/lib/services/notifications/leantime-adapter.ts @@ -320,12 +320,12 @@ export class LeantimeAdapter implements NotificationAdapter { } // Mark each notification as read - const markPromises = unreadNotifications.map(async (notification) => { + const markPromises = unreadNotifications.map(async (notification: { id: number | string; sourceId: string }) => { // Use the ID directly (we already have it from the API response) const notificationId = typeof notification.id === 'number' ? notification.id : parseInt(String(notification.id || notification.sourceId)); if (isNaN(notificationId)) { - console.error(`[LEANTIME_ADAPTER] markAllAsRead - Invalid notification ID: ${sourceId}`); + console.error(`[LEANTIME_ADAPTER] markAllAsRead - Invalid notification ID: ${notification.id || notification.sourceId}`); return false; }