Fix: Provide channel in fields for Twitch events

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-09-02 22:21:27 +02:00
parent 57211b6184
commit cfcc90feea
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D

View File

@ -97,6 +97,7 @@ func (r *twitchWatcher) updateChannelFromAPI(channel string, sendUpdate bool) er
"category": status.Category,
}).Debug("Twitch metadata changed")
go handleMessage(nil, nil, eventTypeTwitchCategoryUpdate, map[string]interface{}{
"channel": channel,
"category": status.Category,
})
}
@ -107,7 +108,8 @@ func (r *twitchWatcher) updateChannelFromAPI(channel string, sendUpdate bool) er
"title": status.Title,
}).Debug("Twitch metadata changed")
go handleMessage(nil, nil, eventTypeTwitchTitleUpdate, map[string]interface{}{
"title": status.Title,
"channel": channel,
"title": status.Title,
})
}
@ -122,7 +124,9 @@ func (r *twitchWatcher) updateChannelFromAPI(channel string, sendUpdate bool) er
evt = eventTypeTwitchStreamOffline
}
go handleMessage(nil, nil, evt, nil)
go handleMessage(nil, nil, evt, map[string]interface{}{
"channel": channel,
})
}
}