From cfcc90feeab21d501a1cca1be07e257b7a465265 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 2 Sep 2021 22:21:27 +0200 Subject: [PATCH] Fix: Provide channel in fields for Twitch events Signed-off-by: Knut Ahlers --- twitchWatcher.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/twitchWatcher.go b/twitchWatcher.go index 15333dd..06d8d60 100644 --- a/twitchWatcher.go +++ b/twitchWatcher.go @@ -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, + }) } }