Probably fixed issue with twitch

This commit is contained in:
Asaf Gartner 2022-03-22 21:00:50 +02:00
parent 5ecd5a8a31
commit b0cf3e2f15
2 changed files with 1 additions and 3 deletions

View File

@ -199,7 +199,7 @@ func getEventSubscriptions(ctx context.Context) ([]twitchEventSub, error) {
type twitchResponse struct {
Data []eventSub `json:"data"`
Pagination *struct {
After string `json:"after"`
After string `json:"cursor"`
} `json:"pagination"`
}

View File

@ -212,7 +212,6 @@ func syncWithTwitch(ctx context.Context, dbConn *pgxpool.Pool, updateAll bool) {
return
}
p.EndBlock()
log.Info().Interface("Subscriptions", subscriptions).Msg("Got subs from twitch")
const (
EventSubNone = 0 // No event of this type found
@ -271,7 +270,6 @@ func syncWithTwitch(ctx context.Context, dbConn *pgxpool.Pool, updateAll bool) {
for twitchID, evStatuses := range streamerEventSubs {
for evType, isSubbed := range evStatuses {
if !isSubbed {
log.Info().Str("TwitchID", twitchID).Str("Type", evType).Msg("Subscribing")
err = subscribeToEvent(ctx, evType, twitchID)
if err != nil {
log.Error().Err(err).Msg("Error while monitoring twitch")