notify on any descendant replies
This commit is contained in:
parent
d0d2d4d1e3
commit
e97951dd18
@ -67,7 +67,7 @@ export default {
|
||||
(SELECT "Item".id::TEXT, "Item".created_at AS "sortTime", NULL as "earnedSats",
|
||||
'Reply' AS type
|
||||
FROM "Item"
|
||||
JOIN "Item" p ON "Item"."parentId" = p.id
|
||||
JOIN "Item" p ON "Item".path <@ p.path
|
||||
WHERE p."userId" = $1
|
||||
AND "Item"."userId" <> $1 AND "Item".created_at <= $2
|
||||
ORDER BY "Item".created_at DESC
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
const newReplies = await models.$queryRaw(`
|
||||
SELECT "Item".id, "Item".created_at
|
||||
FROM "Item"
|
||||
JOIN "Item" p ON "Item"."parentId" = p.id
|
||||
JOIN "Item" p ON "Item".path <@ p.path
|
||||
WHERE p."userId" = $1
|
||||
AND ("Item".created_at > $2 OR $2 IS NULL) AND "Item"."userId" <> $1
|
||||
LIMIT 1`, user.id, user.checkedNotesAt)
|
||||
|
@ -63,7 +63,7 @@ function Notification ({ n }) {
|
||||
? <Item item={n.item} />
|
||||
: (
|
||||
<div className='pb-2'>
|
||||
<Comment item={n.item} noReply includeParent rootText={n.__typename === 'Reply' ? 'replying to you on:' : undefined} clickToContext />
|
||||
<Comment item={n.item} noReply includeParent rootText={n.__typename === 'Reply' ? 'replying on:' : undefined} clickToContext />
|
||||
</div>)}
|
||||
</div>
|
||||
</>)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user