From 330170da15a85995b7a96904253049492a6d65a7 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Tue, 28 Nov 2023 03:29:08 -0500 Subject: [PATCH] Minor HighlightType parsing changes --- TwitchDownloaderCore/Tools/HighlightIcons.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TwitchDownloaderCore/Tools/HighlightIcons.cs b/TwitchDownloaderCore/Tools/HighlightIcons.cs index cff4665e..5aeb5aa8 100644 --- a/TwitchDownloaderCore/Tools/HighlightIcons.cs +++ b/TwitchDownloaderCore/Tools/HighlightIcons.cs @@ -91,7 +91,7 @@ public static HighlightType GetHighlightType(Comment comment) if (bodyWithoutName.StartsWith(" is paying forward the Gift they got from")) return HighlightType.PayingForward; - if (bodyWithoutName.Contains(" consecutive streams this month and sparked a watch streak!", StringComparison.Ordinal)) + if (bodyWithoutName.EndsWith(" consecutive streams this month and sparked a watch streak! ")) return HighlightType.WatchStreak; if (bodyWithoutName.StartsWith(" converted from a")) @@ -116,7 +116,7 @@ public static HighlightType GetHighlightType(Comment comment) if (bodySpan.Equals("bits badge tier notification ", StringComparison.Ordinal)) return HighlightType.BitBadgeTierNotification; - if (char.IsDigit(bodySpan[0]) && bodySpan.Contains("have joined!", StringComparison.Ordinal)) + if (char.IsDigit(bodySpan[0]) && bodySpan.EndsWith(" have joined! ")) { // TODO: use bodySpan when .NET 7 if (Regex.IsMatch(comment.message.body, $@"^\d+ raiders from {comment.commenter.display_name} have joined!"))