Skip to content

Commit

Permalink
Correctly render Twitch gifting additional subs during Subtember
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Oct 28, 2024
1 parent f3af88d commit 19657d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions TwitchDownloaderCore/Tools/HighlightIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ public static HighlightType GetHighlightType(Comment comment)
if (comment.commenter._id is ANONYMOUS_GIFT_ACCOUNT_ID or TWITCH_ACCOUNT_ID && GiftAnonymousRegex.IsMatch(comment.message.body))
return HighlightType.GiftedAnonymous;

if (comment.commenter._id is TWITCH_ACCOUNT_ID && comment.message.body.EndsWith("'s gift! ") &&
Regex.IsMatch(comment.message.body, @"^We added \d+ Gift Subs (?:AND \d+ Bonus Gift Subs )?to "))
{
// TODO: Make a dedicated enum value for Subtember?
return HighlightType.GiftedMany;
}

return HighlightType.None;
}

Expand Down

0 comments on commit 19657d4

Please sign in to comment.