From 83198e7467608f337e7ba6d5a2a83bfbd27b6773 Mon Sep 17 00:00:00 2001 From: soxa <6390896+Soxasora@users.noreply.github.com> Date: Wed, 3 Sep 2025 20:18:29 +0200 Subject: [PATCH] hotfix: make meCommentsViewedAt fallback to createdAt only if there's not lastCommentAt (#2481) --- api/resolvers/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 35c93077..14905f74 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -181,7 +181,7 @@ export async function itemQueryWithMeta ({ me, models, query, orderBy = '' }, .. "ThreadSubscription"."itemId" IS NOT NULL AS "meSubscription", "ItemForward"."itemId" IS NOT NULL AS "meForward", to_jsonb("Sub".*) || jsonb_build_object('meMuteSub', "MuteSub"."userId" IS NOT NULL) || jsonb_build_object('meSubscription', "SubSubscription"."userId" IS NOT NULL) as sub, - COALESCE("CommentsViewAt"."last_viewed_at", "Item"."created_at") as "meCommentsViewedAt" + COALESCE("CommentsViewAt"."last_viewed_at", "Item"."lastCommentAt", "Item"."created_at") as "meCommentsViewedAt" FROM ( ${query} ) "Item"