From b283122951be45f4ca9c9287a3aaf58cc107eb15 Mon Sep 17 00:00:00 2001 From: Tatsuya Koishi Date: Sat, 27 Jan 2024 19:42:35 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88?= =?UTF-8?q?=E3=83=8F=E3=83=83=E3=82=B7=E3=83=A5=E3=82=BF=E3=82=B0=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=A0=E3=83=A9=E3=82=A4=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/server/api/endpoints/notes/hybrid-timeline.ts | 2 +- .../backend/src/server/api/endpoints/notes/local-timeline.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index cc0d759075..c6d6c55e9b 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -205,7 +205,7 @@ export default class extends Endpoint { // eslint- if (defaultTag == null) { qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)'); } else { - qb.orWhere(`(note.visibility = 'public') AND ('${normalizeForSearch(defaultTag)}' = any(note.tags)`); + qb.orWhere(`(note.visibility = 'public') AND (':t' = any(note.tags)`, { t: normalizeForSearch(defaultTag)} ); } })) .innerJoinAndSelect('note.user', 'user') diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 4ad55e3dce..f4b962f465 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -163,8 +163,7 @@ export default class extends Endpoint { // eslint- } else { qb.andWhere(`':t' = any(note.tags)`, { t: normalizeForSearch(defaultTag) }); } - } - )) + })) .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.renote', 'renote')