Skip to content

Commit

Permalink
- Adding user badges and user badges info properties to Twitch Chat M…
Browse files Browse the repository at this point in the history
…essages
  • Loading branch information
Matthew Olivo committed Oct 20, 2024
1 parent a885ae3 commit 4c507de
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);

Expand Down

0 comments on commit 4c507de

Please sign in to comment.