From 4c507de1fa41064e279e9a4fa8df952e07d50cee Mon Sep 17 00:00:00 2001 From: Matthew Olivo Date: Sun, 20 Oct 2024 15:37:02 -0700 Subject: [PATCH] - Adding user badges and user badges info properties to Twitch Chat Messages --- .../ViewModel/Chat/Twitch/TwitchChatMessageViewModel.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MixItUp.Base/ViewModel/Chat/Twitch/TwitchChatMessageViewModel.cs b/MixItUp.Base/ViewModel/Chat/Twitch/TwitchChatMessageViewModel.cs index 6f99a5dbe..5e243ab1c 100644 --- a/MixItUp.Base/ViewModel/Chat/Twitch/TwitchChatMessageViewModel.cs +++ b/MixItUp.Base/ViewModel/Chat/Twitch/TwitchChatMessageViewModel.cs @@ -36,6 +36,9 @@ public class TwitchChatMessageViewModel : UserChatMessageViewModel public string PlainTextMessageNoCheermotes { get; set; } + public string UserBadges { get; set; } + public string UserBadgeInfo { get; set; } + public TwitchChatMessageViewModel(ChatMessagePacketModel message, UserV2ViewModel user) : base(message.ID, StreamingPlatformTypeEnum.Twitch, user) { @@ -58,6 +61,9 @@ public TwitchChatMessageViewModel(ChatMessagePacketModel message, UserV2ViewMode } } + this.UserBadges = message.UserBadges; + this.UserBadgeInfo = message.UserBadgeInfo; + this.HasBits = (int.TryParse(message.Bits, out int bits) && bits > 0); this.IsHighlightedMessage = message.RawPacket.Tags.ContainsKey(TagMessageID) && message.RawPacket.Tags[TagMessageID].Equals(MessageIDHighlightedMessage);