summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;