hotfix: make meCommentsViewedAt fallback to createdAt only if there's not lastCommentAt (#2481)
This commit is contained in:
parent
5c9de4c433
commit
83198e7467
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user