diff --git a/pkg/twitch/eventsub.go b/pkg/twitch/eventsub.go index 52b5706..75cbfa8 100644 --- a/pkg/twitch/eventsub.go +++ b/pkg/twitch/eventsub.go @@ -51,13 +51,15 @@ type ( } EventSubEventAdBreakBegin struct { - Duration int64 `json:"duration"` + Duration int64 `json:"duration_seconds"` Timestamp time.Time `json:"timestamp"` IsAutomatic bool `json:"is_automatic"` BroadcasterUserID string `json:"broadcaster_user_id"` BroadcasterUserLogin string `json:"broadcaster_user_login"` BroadcasterUserName string `json:"broadcaster_user_name"` RequesterUserID string `json:"requester_user_id"` + RequesterUserLogin string `json:"requester_user_login"` + RequesterUserName string `json:"requester_user_name"` } EventSubEventChannelPointCustomRewardRedemptionAdd struct { diff --git a/twitchWatcher.go b/twitchWatcher.go index 24043e9..2644f89 100644 --- a/twitchWatcher.go +++ b/twitchWatcher.go @@ -114,7 +114,7 @@ func (t *twitchWatcher) getTopicRegistrations(userID string) []topicRegistration return []topicRegistration{ { Topic: twitch.EventSubEventTypeChannelAdBreakBegin, - Version: twitch.EventSubTopicVersionBeta, + Version: twitch.EventSubTopicVersion1, Condition: twitch.EventSubCondition{BroadcasterUserID: userID}, RequiredScopes: []string{twitch.ScopeChannelReadAds}, Hook: t.handleEventSubChannelAdBreakBegin,