This commit is contained in:
alma 2026-01-06 18:58:21 +01:00
parent ddacd8d6e3
commit e81b31c9ee

View File

@ -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;
}