summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-05-10 22:32:06 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-05-10 22:32:06 -0400
commit9dbdb97bb52189fb0c74c9dbdb171b984468619e (patch)
tree758d687bd58a468ec8ee1b2bf66699a6438a6ec8
parentmerge: put back buttons "show/hide replies-to-others from all" (!1009) (diff)
downloadsharkey-9dbdb97bb52189fb0c74c9dbdb171b984468619e.tar.gz
sharkey-9dbdb97bb52189fb0c74c9dbdb171b984468619e.tar.bz2
sharkey-9dbdb97bb52189fb0c74c9dbdb171b984468619e.zip
allow checkWordMute to accept raw strings
-rw-r--r--packages/frontend/src/utility/check-word-mute.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/utility/check-word-mute.ts b/packages/frontend/src/utility/check-word-mute.ts
index 37ad678555..26bf593f7b 100644
--- a/packages/frontend/src/utility/check-word-mute.ts
+++ b/packages/frontend/src/utility/check-word-mute.ts
@@ -4,12 +4,12 @@
*/
import * as Misskey from 'misskey-js';
-export function checkWordMute(note: Misskey.entities.Note, me: Misskey.entities.UserLite | null | undefined, mutedWords: Array<string | string[]>): Array<string | string[]> | false {
+export function checkWordMute(note: string | Misskey.entities.Note, me: Misskey.entities.UserLite | null | undefined, mutedWords: Array<string | string[]>): Array<string | string[]> | false {
// 自分自身
- if (me && (note.userId === me.id)) return false;
+ if (me && typeof(note) === 'object' && (note.userId === me.id)) return false;
if (mutedWords.length > 0) {
- const text = getNoteText(note);
+ const text = typeof(note) === 'object' ? getNoteText(note) : note;
if (text === '') return false;