merge: prettier query for bubble timeline (#204)

This commit is contained in:
Marie 2023-12-04 15:46:20 +01:00 committed by GitHub
commit 0de8053bc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,9 +79,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('note.visibility = \'public\'') .andWhere('note.visibility = \'public\'')
.andWhere('note.channelId IS NULL') .andWhere('note.channelId IS NULL')
.andWhere( .andWhere('note.userHost IN (:...hosts)', { hosts: instance.bubbleInstances })
`(note.userHost = ANY ('{"${instance.bubbleInstances.join('","')}"}'))`,
)
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote') .leftJoinAndSelect('note.renote', 'renote')