Skip to content

Commit

Permalink
Support blocking commenters based on their non-ASCII name (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN authored Apr 17, 2024
1 parent a503d3f commit 0243387
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TwitchDownloaderCore/ChatRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ private void RemoveRestrictedComments(List<Comment> comments)
{
foreach (var username in renderOptions.IgnoreUsersArray)
{
if (username.Equals(comments[i].commenter.name, StringComparison.OrdinalIgnoreCase))
if (username.Equals(comments[i].commenter.name, StringComparison.OrdinalIgnoreCase) // ASCII login name
|| (username.Any(IsNotAscii) && username.Equals(comments[i].commenter.display_name, StringComparison.InvariantCultureIgnoreCase))) // Potentially non-ASCII display name
{
comments.RemoveAt(i);
i--;
Expand Down

0 comments on commit 0243387

Please sign in to comment.