diff --git a/src/components/overlays/notificationsModal/components/NotificationModal.tsx b/src/components/overlays/notificationsModal/components/NotificationModal.tsx index 02496949..31ab5b4f 100644 --- a/src/components/overlays/notificationsModal/components/NotificationModal.tsx +++ b/src/components/overlays/notificationsModal/components/NotificationModal.tsx @@ -154,7 +154,9 @@ export function NotificationModal({ id }: NotificationModalProps) { item.querySelector("category")?.textContent || ""; // Skip items without essential data - if (!guid || !title) { + // Use link as fallback for guid if guid is missing + const itemGuid = guid || link; + if (!itemGuid || !title) { return; } @@ -162,7 +164,7 @@ export function NotificationModal({ id }: NotificationModalProps) { const notificationDate = new Date(pubDate); allNotifications.push({ - guid, + guid: itemGuid, title, link, description, @@ -173,7 +175,7 @@ export function NotificationModal({ id }: NotificationModalProps) { // Collect GUIDs of notifications older than autoReadDays if (notificationDate <= autoReadDate) { - autoReadGuids.push(guid); + autoReadGuids.push(itemGuid); } } catch (itemError) { // Skip malformed items diff --git a/src/components/overlays/notificationsModal/hooks/useNotifications.ts b/src/components/overlays/notificationsModal/hooks/useNotifications.ts index e977ec43..e47b47cd 100644 --- a/src/components/overlays/notificationsModal/hooks/useNotifications.ts +++ b/src/components/overlays/notificationsModal/hooks/useNotifications.ts @@ -68,12 +68,14 @@ export function useNotifications() { item.querySelector("category")?.textContent || ""; // Skip items without essential data - if (!guid || !title) { + // Use link as fallback for guid if guid is missing + const itemGuid = guid || link; + if (!itemGuid || !title) { return; } allNotifications.push({ - guid, + guid: itemGuid, title, link, description,