From 7fd4f58e81595da67db2c2192c58d7f15d15400a Mon Sep 17 00:00:00 2001 From: ekzyis Date: Mon, 22 Jul 2024 16:14:48 -0500 Subject: [PATCH] Fix subscription ignores OP replies (#1272) --- api/paidAction/itemCreate.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/paidAction/itemCreate.js b/api/paidAction/itemCreate.js index 2ed2f634..77d38205 100644 --- a/api/paidAction/itemCreate.js +++ b/api/paidAction/itemCreate.js @@ -215,8 +215,7 @@ export async function onPaid ({ invoice, id }, context) { INSERT INTO "Reply" (created_at, updated_at, "ancestorId", "ancestorUserId", "itemId", "userId", level) SELECT comment.created_at, comment.updated_at, ancestors.id, ancestors."userId", comment.id, comment."userId", nlevel(comment.path) - nlevel(ancestors.path) - FROM ancestors, comment - WHERE ancestors."userId" <> comment."userId"` + FROM ancestors, comment` notifyItemParents({ item, models }).catch(console.error) }