Fix channel bug

This commit is contained in:
naskya 2023-05-05 07:47:03 +09:00
parent 3b3da42763
commit edf47d390b
No known key found for this signature in database
GPG key ID: 164DFF24E2D40139
2 changed files with 3 additions and 3 deletions

View file

@ -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(/^\/(.+)\/(.*)$/);

View file

@ -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);
}