This commit is contained in:
naskya 2023-05-18 20:50:24 +09:00
parent 079d757009
commit 80d4f06962
No known key found for this signature in database
GPG key ID: 164DFF24E2D40139
2 changed files with 6 additions and 2 deletions

View file

@ -19,7 +19,9 @@ function checkWordMute(
): boolean {
if (note == null) return false;
const text = `${note.cw ?? ""} ${note.text ?? ""} ${note.files.map((f) => f.comment ?? "").join(" ")}`.trim();
const text = `${note.cw ?? ""} ${note.text ?? ""} ${note.files
.map((f) => f.comment ?? "")
.join(" ")}`.trim();
if (text === "") return false;
for (const mutePattern of mutedWords) {

View file

@ -10,7 +10,9 @@ function checkWordMute(
note: NoteLike,
mutedWords: Array<string | string[]>,
): Muted {
const text = `${note.cw ?? ""} ${note.text ?? ""} ${note.files.map((f) => f.comment ?? "").join(" ")}`.trim();
const text = `${note.cw ?? ""} ${note.text ?? ""} ${note.files
.map((f) => f.comment ?? "")
.join(" ")}`.trim();
if (text === "") return NotMuted;
let result = { muted: false, matched: [] };