mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 22:15:12 +00:00
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:
parent
ca06e45299
commit
c05de08a3b
1 changed files with 1 additions and 3 deletions
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue