about summary refs log tree commit diff
path: root/src/state/queries/notifications/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/queries/notifications/util.ts')
-rw-r--r--src/state/queries/notifications/util.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/queries/notifications/util.ts b/src/state/queries/notifications/util.ts
index 9fb25867a..cc5943163 100644
--- a/src/state/queries/notifications/util.ts
+++ b/src/state/queries/notifications/util.ts
@@ -68,8 +68,14 @@ export async function fetchPage({
     notif => !isThreadMuted(notif, threadMutes),
   )
 
+  let seenAt = res.data.seenAt ? new Date(res.data.seenAt) : new Date()
+  if (Number.isNaN(seenAt.getTime())) {
+    seenAt = new Date()
+  }
+
   return {
     cursor: res.data.cursor,
+    seenAt,
     items: notifsGrouped,
   }
 }