From 2d7a2a3d6a2737d4631e6d3b8c7c5592be202485 Mon Sep 17 00:00:00 2001 From: Tatsuya Koishi Date: Sat, 27 Jan 2024 19:16:13 +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 --- packages/backend/src/core/NoteCreateService.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index ee30e28e1d..3c13ef022d 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -59,6 +59,7 @@ import { UtilityService } from '@/core/UtilityService.js'; import { UserBlockingService } from '@/core/UserBlockingService.js'; import { isReply } from '@/misc/is-reply.js'; import { trackPromise } from '@/misc/promise-tracker.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; import { loadConfig } from '@/config.js'; type NotificationType = 'reply' | 'renote' | 'quote' | 'mention'; @@ -916,11 +917,14 @@ export class NoteCreateService implements OnApplicationShutdown { // デフォルトハッシュタグ const config = loadConfig(); - if (note.visibility === 'public' && note.tags.includes(String(config.tagging.defaultTag))) { - this.fanoutTimelineService.push('localTimelineWithReplies', note.id, 300, r); - this.fanoutTimelineService.push('localTimeline', note.id, 1000, r); - if (note.fileIds.length > 0) { - this.fanoutTimelineService.push('localTimelineWithFiles', note.id, 500, r); + let defaultTag:string | null = config.tagging.defaultTag; + if (defaultTag != null) { + if (note.visibility === 'public' && note.tags.includes(normalizeForSearch(defaultTag))) { + this.fanoutTimelineService.push('localTimelineWithReplies', note.id, 300, r); + this.fanoutTimelineService.push('localTimeline', note.id, 1000, r); + if (note.fileIds.length > 0) { + this.fanoutTimelineService.push('localTimelineWithFiles', note.id, 500, r); + } } }