Skip to content

Commit

Permalink
Merge pull request #202 from twitchdev/eventsub-type-consistency
Browse files Browse the repository at this point in the history
Eventsub type consistency, matching change in #202
  • Loading branch information
Xemdo authored Dec 4, 2022
2 parents 59288c0 + fcbd718 commit f2a854b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func init() {
triggerCmd.Flags().StringVarP(&eventID, "subscription-id", "u", "", "Manually set the subscription/event ID of the event itself.") // TODO: This description will need to change with https://github.com/twitchdev/twitch-cli/issues/184
triggerCmd.Flags().StringVar(&timestamp, "timestamp", "", "Sets the timestamp to be used in payloads and headers. Must be in RFC3339Nano format.")
triggerCmd.Flags().IntVar(&charityCurrentValue, "charity-current-value", 0, "Only used for \"charity-*\" events. Manually set the current dollar value for charity events.")
triggerCmd.Flags().IntVar(&charityTargetValue, "charity-target-value", 1500000, "Only used for \"charity-*\" events. Manually set the current dollar value for charity events")
triggerCmd.Flags().IntVar(&charityTargetValue, "charity-target-value", 1500000, "Only used for \"charity-*\" events. Manually set the target dollar value for charity events.")

// retrigger flags
retriggerCmd.Flags().StringVarP(&forwardAddress, "forward-address", "F", "", "Forward address for mock event.")
Expand Down
2 changes: 1 addition & 1 deletion internal/events/types/follow/follow_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Type: "channel.follow",
Type: triggerMapping[params.Transport][params.Trigger],
Version: e.SubscriptionVersion(),
Condition: models.EventsubCondition{
BroadcasterUserID: params.ToUserID,
Expand Down
2 changes: 1 addition & 1 deletion internal/events/types/stream_change/stream_change_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Type: "channel.update",
Type: triggerMapping[params.Transport][params.Trigger],
Version: e.SubscriptionVersion(),
Condition: models.EventsubCondition{
BroadcasterUserID: params.ToUserID,
Expand Down
2 changes: 1 addition & 1 deletion internal/events/types/user/user_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Type: "user.update",
Type: triggerMapping[params.Transport][params.Trigger],
Version: e.SubscriptionVersion(),
Condition: models.EventsubCondition{
UserID: params.ToUserID,
Expand Down

0 comments on commit f2a854b

Please sign in to comment.