From 19657d494ff9b1f3ee15b0918932ffd644217308 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:40:56 -0400 Subject: [PATCH] Correctly render Twitch gifting additional subs during Subtember --- TwitchDownloaderCore/Tools/HighlightIcons.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TwitchDownloaderCore/Tools/HighlightIcons.cs b/TwitchDownloaderCore/Tools/HighlightIcons.cs index 5d592375..b9b501ae 100644 --- a/TwitchDownloaderCore/Tools/HighlightIcons.cs +++ b/TwitchDownloaderCore/Tools/HighlightIcons.cs @@ -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; }