From ad8906d82e97be54e6a4935db1db1e87eee777e2 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 18 Oct 2026 18:53:08 -0400 Subject: [PATCH] perf: Count notifications without default scope joins (#14139) --- server/routes/api/notifications/notifications.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes/api/notifications/notifications.ts b/server/routes/api/notifications/notifications.ts index a3811b080a..69317b137d 100644 --- a/server/routes/api/notifications/notifications.ts +++ b/server/routes/api/notifications/notifications.ts @@ -113,10 +113,10 @@ router.post( offset: ctx.state.pagination.offset, limit: ctx.state.pagination.limit, }), - Notification.count({ + Notification.unscoped().count({ where, }), - Notification.count({ + Notification.unscoped().count({ where: { ...where, viewedAt: {