From 63685ff5f2d09afe9dfacee46e0189f8d2028fe0 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 11 May 2023 14:42:32 +0200 Subject: [PATCH] [core] Allow case insensitive category matches Signed-off-by: Knut Ahlers --- pkg/twitch/channels.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/twitch/channels.go b/pkg/twitch/channels.go index cbdcae9..4569f2a 100644 --- a/pkg/twitch/channels.go +++ b/pkg/twitch/channels.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "net/http" + "strings" "github.com/pkg/errors" ) @@ -75,7 +76,7 @@ func (c *Client) ModifyChannelInformation(ctx context.Context, broadcasterName s default: // Multiple matches: Search for exact one for _, c := range categories { - if c.Name == *game { + if strings.EqualFold(c.Name, *game) { gid := c.ID data.GameID = &gid break