mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
Compare commits
2 commits
eec4966b82
...
01390583b2
Author | SHA1 | Date | |
---|---|---|---|
01390583b2 | |||
3ac5284583 |
2 changed files with 19 additions and 0 deletions
12
History.md
12
History.md
|
@ -1,3 +1,15 @@
|
|||
# 3.22.0 / 2023-12-14
|
||||
|
||||
* Improvements
|
||||
* [editor] Display clear warning when ext perms are missing
|
||||
* [eventsub] Make topic subscriptions more dynamic
|
||||
|
||||
* Bugfixes
|
||||
* [core] Fix: Properly handle channels without credentials
|
||||
* [eventsub] Fix: Clean IPs from eventsub-socket read errors
|
||||
* [eventsub] Update field naming for ad-break, use V1 event
|
||||
* [twitch] Fix: Log correct error when wiping token fails
|
||||
|
||||
# 3.21.0 / 2023-12-09
|
||||
|
||||
* Improvements
|
||||
|
|
|
@ -172,6 +172,13 @@ func (s Service) GetTwitchClientForChannel(channel string, cfg ClientConfig) (*t
|
|||
return nil, errors.Wrap(err, "decrypting refresh token")
|
||||
}
|
||||
|
||||
if perm.AccessToken == "" && perm.RefreshToken == "" {
|
||||
// We have no tokens but an entry in the permission table: Means
|
||||
// we still can't do stuff on behalf of that channel so we treat
|
||||
// that as an unauthorized channel
|
||||
return nil, ErrChannelNotAuthorized
|
||||
}
|
||||
|
||||
scopes := strings.Split(perm.Scopes, " ")
|
||||
|
||||
tc := twitch.New(cfg.TwitchClient, cfg.TwitchClientSecret, perm.AccessToken, perm.RefreshToken)
|
||||
|
|
Loading…
Reference in a new issue