mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 08:40:01 +00:00
Fix: Provide channel in fields for Twitch events
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
57211b6184
commit
cfcc90feea
1 changed files with 6 additions and 2 deletions
|
@ -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,6 +108,7 @@ func (r *twitchWatcher) updateChannelFromAPI(channel string, sendUpdate bool) er
|
|||
"title": status.Title,
|
||||
}).Debug("Twitch metadata changed")
|
||||
go handleMessage(nil, nil, eventTypeTwitchTitleUpdate, map[string]interface{}{
|
||||
"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,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue