From bba51dfa18d3e1bee4a544cf42ec322cbbe9009a Mon Sep 17 00:00:00 2001 From: tyler Date: Tue, 6 Feb 2024 14:49:20 -0500 Subject: [PATCH] Added channel name to chat view --- chat.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/chat.go b/chat.go index a1dd3bf..f06635c 100644 --- a/chat.go +++ b/chat.go @@ -314,15 +314,16 @@ func startChatStream(ctx context.Context, event chan *sse.Event, handle func(cv } type ChatView struct { - Badges []string - Color string - ImageUrl string - Init bool - IsFollower bool - Rant int - Text string - Type string - Username string + Badges []string + ChannelName string + Color string + ImageUrl string + Init bool + IsFollower bool + Rant int + Text string + Type string + Username string } func parseEvent(event []byte) ([]ChatView, error) { @@ -397,7 +398,7 @@ func parseMessages(eventType string, messages []ChatEventMessage, users map[stri } view.ImageUrl = channel.Image1 - view.Username = channel.Username + view.ChannelName = channel.Username } views = append(views, view)