mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
refactor config and security to simplified the structure (#2068)
This commit is contained in:
@@ -184,8 +184,8 @@ func (c *OneBotChannel) connect() error {
|
||||
dialer.HandshakeTimeout = 10 * time.Second
|
||||
|
||||
header := make(map[string][]string)
|
||||
if c.config.AccessToken() != "" {
|
||||
header["Authorization"] = []string{"Bearer " + c.config.AccessToken()}
|
||||
if c.config.AccessToken.String() != "" {
|
||||
header["Authorization"] = []string{"Bearer " + c.config.AccessToken.String()}
|
||||
}
|
||||
|
||||
conn, resp, err := dialer.Dial(c.config.WSUrl, header)
|
||||
|
||||
Reference in New Issue
Block a user