From c2e1f6094300ed71cbf4eeeb8698f3b6c0780057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Sat, 16 Mar 2024 17:37:58 +0900 Subject: [PATCH] =?UTF-8?q?enhance:=20=E3=82=BF=E3=82=B0=E6=A4=9C=E7=B4=A2?= =?UTF-8?q?=E3=81=AB=E3=81=8A=E3=81=84=E3=81=A6=E3=83=AD=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E3=81=BF=E3=82=84=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E4=BB=98=E3=81=8D=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20(MisskeyIO#527)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cheery-picked from TeamNijimiss/misskey@4fe36c8eb92435cc2f865e0224535432fd9b4eca Co-authored-by: Nafu Satsuki --- .../api/endpoints/notes/search-by-tag.ts | 9 ++++ packages/frontend/src/pages/tag.vue | 43 +++++++++++++++++-- packages/misskey-js/src/autogen/types.ts | 2 + 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index 626ff080c..40988a7a4 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -30,6 +30,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { + local: { type: 'boolean', nullable: true, default: null }, reply: { type: 'boolean', nullable: true, default: null }, renote: { type: 'boolean', nullable: true, default: null }, withFiles: { @@ -105,6 +106,14 @@ export default class extends Endpoint { // eslint- throw e; } + if (ps.local != null) { + if (ps.local) { + query.andWhere('user.host IS NULL'); + } else { + query.andWhere('user.host IS NOT NULL'); + } + } + if (ps.reply != null) { if (ps.reply) { query.andWhere('note.replyId IS NOT NULL'); diff --git a/packages/frontend/src/pages/tag.vue b/packages/frontend/src/pages/tag.vue index 9b7739287..dce974d87 100644 --- a/packages/frontend/src/pages/tag.vue +++ b/packages/frontend/src/pages/tag.vue @@ -5,9 +5,17 @@ SPDX-License-Identifier: AGPL-3.0-only