mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-08 16:20:02 +00:00
Fix: Set initial value
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
a414a44190
commit
43849052e1
1 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,10 @@ func (r *twitchWatcher) updateChannelFromAPI(channel string, sendUpdate bool) er
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r.ChannelStatus[channel] == nil {
|
||||||
|
r.ChannelStatus[channel] = &status
|
||||||
|
}
|
||||||
|
|
||||||
if r.ChannelStatus[channel].Category != status.Category {
|
if r.ChannelStatus[channel].Category != status.Category {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"channel": channel,
|
"channel": channel,
|
||||||
|
|
Loading…
Reference in a new issue