From: Fl_GUI Date: Sat, 7 Dec 2024 14:05:27 +0000 (+0100) Subject: fixes X-Git-Url: https://git.openfl.eu/?a=commitdiff_plain;ds=inline;p=twitch-chat.git fixes --- diff --git a/twitch/chatclient.go b/twitch/chatclient.go index 2cca6d1..854c159 100644 --- a/twitch/chatclient.go +++ b/twitch/chatclient.go @@ -31,7 +31,7 @@ func (c ChatClient) Close() { func (c *ChatClient) WithAuthentication(nickname, accessToken string) { c.nickname = nickname - accessToken = accessToken + c.accessToken = accessToken } func (c *ChatClient) WithoutAuthentication() { @@ -108,6 +108,9 @@ func (c *ChatClient) pingPong() { } func (c *ChatClient) askCapabilities() error { + if len(c.capabilities) == 0 { + return nil + } var caps = make([]string, 0, len(c.capabilities)) for c, _ := range c.capabilities { caps = append(caps, c) diff --git a/twitch/core/auth.go b/twitch/core/auth.go index 294dab2..63aaf11 100644 --- a/twitch/core/auth.go +++ b/twitch/core/auth.go @@ -9,7 +9,7 @@ import ( "fl-gui.name/twitchchat/twitch/core/notice" ) -// see https://dev.twitch.tv/docs/irc/authenticate-bot/#sending-the-pass-and-nick-messages. +// see https://dev.twitch.tv/docs/chat/irc/#authenticating-with-the-twitch-irc-server // The nickname should be the lowercase login name of the Twitch account used to get your access token func (c *Conn) Authenticate(nickname, access_token string, msgs <-chan messages.Message) (<-chan messages.Message, error) { res := make(chan messages.Message)