summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2023-12-04 14:13:52 +0000
committerdakkar <dakkar@thenautilus.net>2023-12-04 14:13:52 +0000
commitc05de08a3b2ca08931b22d0ddd62b5cce690f881 (patch)
tree5a111b69284efe3c2cfa10da097c1a916366f713 /packages/backend/src/server/api
parentfix: build error (diff)
downloadsharkey-c05de08a3b2ca08931b22d0ddd62b5cce690f881.tar.gz
sharkey-c05de08a3b2ca08931b22d0ddd62b5cce690f881.tar.bz2
sharkey-c05de08a3b2ca08931b22d0ddd62b5cce690f881.zip
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.
Diffstat (limited to 'packages/backend/src/server/api')
-rw-r--r--packages/backend/src/server/api/endpoints/notes/bubble-timeline.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/backend/src/server/api/endpoints/notes/bubble-timeline.ts b/packages/backend/src/server/api/endpoints/notes/bubble-timeline.ts
index 0652c82a9d..4b326a4ee4 100644
--- a/packages/backend/src/server/api/endpoints/notes/bubble-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/bubble-timeline.ts
@@ -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')