From 74f771adf4a654c58ef1fd956cc0c36daee92a28 Mon Sep 17 00:00:00 2001 From: k00b Date: Fri, 27 Dec 2024 19:06:30 -0600 Subject: [PATCH] fix #1754 --- api/paidAction/itemCreate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/paidAction/itemCreate.js b/api/paidAction/itemCreate.js index 9f6a23fb..6c41ee24 100644 --- a/api/paidAction/itemCreate.js +++ b/api/paidAction/itemCreate.js @@ -223,7 +223,7 @@ export async function onPaid ({ invoice, id }, context) { ), ancestors AS ( UPDATE "Item" SET ncomments = "Item".ncomments + 1, - "lastCommentAt" = now(), + "lastCommentAt" = GREATEST("Item"."lastCommentAt", comment.created_at), "weightedComments" = "Item"."weightedComments" + CASE WHEN comment."userId" = "Item"."userId" THEN 0 ELSE comment.trust END FROM comment