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): Array | false { +export function checkWordMute(note: string | Misskey.entities.Note, me: Misskey.entities.UserLite | null | undefined, mutedWords: Array): Array | 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;