Skip to content

Commit

Permalink
chore: adjust the "msg was filtered" error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer committed Oct 6, 2023
1 parent 527d38d commit 7960530
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,13 +1204,8 @@ class Chat {
);
break;
case 'bannedphrase': {
const phraseCountText =
data.filtered.length === 1
? 'this banned phrase'
: 'these banned phrases';
const filteredPretty = data.filtered.map((p) => `"${p}"`).join(', ');
message = MessageBuilder.error(
`Your message was filtered because it contained ${phraseCountText}: ${filteredPretty}.`,
`Your message was filtered because it contained this banned phrase: "${data.filtered}".`,
);
break;
}
Expand Down

0 comments on commit 7960530

Please sign in to comment.