Skip to content

Commit

Permalink
Merge pull request #244 from twitchdev/retrigger-follow-fix
Browse files Browse the repository at this point in the history
Fixed issue with retrigger events when events have multiple versions
  • Loading branch information
Xemdo authored Jun 29, 2023
2 parents 74cca29 + 3a54ac9 commit 3d4f21a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/events/trigger/retrigger_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ func RefireEvent(id string, p TriggerParameters) (string, error) {

p.Transport = res.Transport

var previousEventObj models.EventsubSubscription
var previousEventObj models.EventsubResponse
err = json.Unmarshal([]byte(res.JSON), &previousEventObj)
if err != nil {
return "", fmt.Errorf("Unable to parse previous event's JSON from database: %v", err.Error())
}

e, err := types.GetByTriggerAndTransportAndVersion(res.Event, p.Transport, previousEventObj.Version)
e, err := types.GetByTriggerAndTransportAndVersion(res.Event, p.Transport, previousEventObj.Subscription.Version)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 3d4f21a

Please sign in to comment.