hasnewnotes query cleanup
This commit is contained in:
parent
4d7d4c28f9
commit
1a33c8778b
@ -310,7 +310,8 @@ export default {
|
|||||||
JOIN "Item" ON ${user.noteAllDescendants ? '"Item".path <@ p.path' : '"Item"."parentId" = p.id'}
|
JOIN "Item" ON ${user.noteAllDescendants ? '"Item".path <@ p.path' : '"Item"."parentId" = p.id'}
|
||||||
${whereClause(
|
${whereClause(
|
||||||
'"ThreadSubscription"."userId" = $1',
|
'"ThreadSubscription"."userId" = $1',
|
||||||
'"Item".created_at > $2::timestamp(3) without time zone',
|
'"Item".created_at > $2',
|
||||||
|
'"Item".created_at >= "ThreadSubscription".created_at',
|
||||||
'"Item"."userId" <> $1',
|
'"Item"."userId" <> $1',
|
||||||
await filterClause(me, models),
|
await filterClause(me, models),
|
||||||
muteClause(me)
|
muteClause(me)
|
||||||
@ -326,7 +327,7 @@ export default {
|
|||||||
JOIN "Item" ON "UserSubscription"."followeeId" = "Item"."userId"
|
JOIN "Item" ON "UserSubscription"."followeeId" = "Item"."userId"
|
||||||
${whereClause(
|
${whereClause(
|
||||||
'"UserSubscription"."followerId" = $1',
|
'"UserSubscription"."followerId" = $1',
|
||||||
'"Item".created_at > $2::timestamp(3) without time zone',
|
'"Item".created_at > $2',
|
||||||
`(
|
`(
|
||||||
("Item"."parentId" IS NULL AND "UserSubscription"."postsSubscribedAt" IS NOT NULL AND "Item".created_at >= "UserSubscription"."postsSubscribedAt")
|
("Item"."parentId" IS NULL AND "UserSubscription"."postsSubscribedAt" IS NOT NULL AND "Item".created_at >= "UserSubscription"."postsSubscribedAt")
|
||||||
OR ("Item"."parentId" IS NOT NULL AND "UserSubscription"."commentsSubscribedAt" IS NOT NULL AND "Item".created_at >= "UserSubscription"."commentsSubscribedAt")
|
OR ("Item"."parentId" IS NOT NULL AND "UserSubscription"."commentsSubscribedAt" IS NOT NULL AND "Item".created_at >= "UserSubscription"."commentsSubscribedAt")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user