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