Skip to content

Commit

Permalink
fix #1754
Browse files Browse the repository at this point in the history
  • Loading branch information
huumn committed Dec 28, 2024
1 parent eb22fda commit 74f771a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/paidAction/itemCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74f771a

Please sign in to comment.