prettier query for bubble timeline

I *think* this works; in my test instance (with no federated notes…)
the generated query looks correct, and PostgreSQL doesn't complain.
This commit is contained in:
dakkar 2023-12-04 14:13:52 +00:00
parent ca06e45299
commit c05de08a3b

View file

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