mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
format
This commit is contained in:
parent
490ede7caa
commit
35c8dbcfca
2 changed files with 6 additions and 2 deletions
|
@ -19,7 +19,9 @@ function checkWordMute(
|
||||||
): boolean {
|
): boolean {
|
||||||
if (note == null) return false;
|
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;
|
if (text === "") return false;
|
||||||
|
|
||||||
for (const mutePattern of mutedWords) {
|
for (const mutePattern of mutedWords) {
|
||||||
|
|
|
@ -10,7 +10,9 @@ function checkWordMute(
|
||||||
note: NoteLike,
|
note: NoteLike,
|
||||||
mutedWords: Array<string | string[]>,
|
mutedWords: Array<string | string[]>,
|
||||||
): Muted {
|
): 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;
|
if (text === "") return NotMuted;
|
||||||
|
|
||||||
let result = { muted: false, matched: [] };
|
let result = { muted: false, matched: [] };
|
||||||
|
|
Loading…
Reference in a new issue