From edf47d390bb5f463ad59e748e430fe448bbcd238 Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 5 May 2023 07:47:03 +0900 Subject: [PATCH] Fix channel bug --- packages/backend/src/misc/check-word-mute.ts | 4 ++-- packages/backend/src/server/api/stream/channels/channel.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/misc/check-word-mute.ts b/packages/backend/src/misc/check-word-mute.ts index 5d0cd581fa..b1d2e1bffe 100644 --- a/packages/backend/src/misc/check-word-mute.ts +++ b/packages/backend/src/misc/check-word-mute.ts @@ -21,9 +21,9 @@ function checkWordMute( const text = ((note.cw ?? "") + " " + (note.text ?? "")).trim(); if (text === "") return false; - const matched = mutedWords.some(filter => { + const matched = mutedWords.some((filter) => { if (Array.isArray(filter)) { - return filter.every(keyword => text.includes(keyword)); + return filter.every((keyword) => text.includes(keyword)); } else { // represents RegExp const regexp = filter.match(/^\/(.+)\/(.*)$/); diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts index f5c5a170d9..a9608c2948 100644 --- a/packages/backend/src/server/api/stream/channels/channel.ts +++ b/packages/backend/src/server/api/stream/channels/channel.ts @@ -16,7 +16,7 @@ export default class extends Channel { constructor(id: string, connection: Channel["connection"]) { super(id, connection); - this.onNote = this.onNote.bind(this); + this.onNote = this.withPackedNote(this.onNote.bind(this)); this.emitTypers = this.emitTypers.bind(this); }