Fix: Set initial value

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-09-02 17:39:21 +02:00
parent a414a44190
commit 43849052e1
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -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,