summaryrefslogtreecommitdiff
path: root/src/services/note
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-02-07 10:43:34 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-02-07 10:43:34 +0900
commit0a64d121d9a1345e4a5dd71686fd3be400558595 (patch)
treeeaea3a4d88d412bd1429fbfe787e6d006043205e /src/services/note
parent:art: (diff)
downloadmisskey-0a64d121d9a1345e4a5dd71686fd3be400558595.tar.gz
misskey-0a64d121d9a1345e4a5dd71686fd3be400558595.tar.bz2
misskey-0a64d121d9a1345e4a5dd71686fd3be400558595.zip
Resolve #7149
Diffstat (limited to 'src/services/note')
-rw-r--r--src/services/note/create.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/services/note/create.ts b/src/services/note/create.ts
index f6593996e9..62ec92f2bc 100644
--- a/src/services/note/create.ts
+++ b/src/services/note/create.ts
@@ -33,6 +33,7 @@ import { addNoteToAntenna } from '../add-note-to-antenna';
import { countSameRenotes } from '../../misc/count-same-renotes';
import { deliverToRelays } from '../relay';
import { Channel } from '../../models/entities/channel';
+import { normalizeForSearch } from '../../misc/normalize-for-search';
type NotificationType = 'reply' | 'renote' | 'quote' | 'mention';
@@ -460,7 +461,7 @@ async function insertNote(user: User, data: Option, tags: string[], emojis: stri
text: data.text,
hasPoll: data.poll != null,
cw: data.cw == null ? null : data.cw,
- tags: tags.map(tag => tag.toLowerCase()),
+ tags: tags.map(tag => normalizeForSearch(tag)),
emojis,
userId: user.id,
viaMobile: data.viaMobile!,
@@ -547,7 +548,7 @@ function index(note: Note) {
index: config.elasticsearch.index || 'misskey_note',
id: note.id.toString(),
body: {
- text: note.text.toLowerCase(),
+ text: normalizeForSearch(note.text),
userId: note.userId,
userHost: note.userHost
}