Fix no red square for territory posts (#1187)

This commit is contained in:
ekzyis 2024-05-23 09:35:06 -05:00 committed by GitHub
parent 517aff1da3
commit 0719ec114d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -311,6 +311,22 @@ export default {
return true
}
const [newSubPost] = await models.$queryRawUnsafe(`
SELECT EXISTS(
SELECT *
FROM "SubSubscription"
JOIN "Item" ON "SubSubscription"."subName" = "Item"."subName"
${whereClause(
'"SubSubscription"."userId" = $1',
'"Item".created_at > $2',
'"Item"."parentId" IS NULL',
await filterClause(me, models),
muteClause(me))})`, me.id, lastChecked)
if (newSubPost.exists) {
foundNotes()
return true
}
// check if they have any mentions since checkedNotesAt
if (user.noteMentions) {
const [newMentions] = await models.$queryRawUnsafe(`