mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
Fix channel bug
This commit is contained in:
parent
c99badde3e
commit
9e62df0c8f
2 changed files with 3 additions and 3 deletions
|
@ -21,9 +21,9 @@ function checkWordMute(
|
||||||
const text = ((note.cw ?? "") + " " + (note.text ?? "")).trim();
|
const text = ((note.cw ?? "") + " " + (note.text ?? "")).trim();
|
||||||
if (text === "") return false;
|
if (text === "") return false;
|
||||||
|
|
||||||
const matched = mutedWords.some(filter => {
|
const matched = mutedWords.some((filter) => {
|
||||||
if (Array.isArray(filter)) {
|
if (Array.isArray(filter)) {
|
||||||
return filter.every(keyword => text.includes(keyword));
|
return filter.every((keyword) => text.includes(keyword));
|
||||||
} else {
|
} else {
|
||||||
// represents RegExp
|
// represents RegExp
|
||||||
const regexp = filter.match(/^\/(.+)\/(.*)$/);
|
const regexp = filter.match(/^\/(.+)\/(.*)$/);
|
||||||
|
|
|
@ -16,7 +16,7 @@ export default class extends Channel {
|
||||||
|
|
||||||
constructor(id: string, connection: Channel["connection"]) {
|
constructor(id: string, connection: Channel["connection"]) {
|
||||||
super(id, connection);
|
super(id, connection);
|
||||||
this.onNote = this.onNote.bind(this);
|
this.onNote = this.withPackedNote(this.onNote.bind(this));
|
||||||
this.emitTypers = this.emitTypers.bind(this);
|
this.emitTypers = this.emitTypers.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue