Skip to content

Commit f2a854b

Browse files
authored
Merge pull request #202 from twitchdev/eventsub-type-consistency
Eventsub type consistency, matching change in #202
2 parents 59288c0 + fcbd718 commit f2a854b

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

cmd/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func init() {
124124
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
125125
triggerCmd.Flags().StringVar(&timestamp, "timestamp", "", "Sets the timestamp to be used in payloads and headers. Must be in RFC3339Nano format.")
126126
triggerCmd.Flags().IntVar(&charityCurrentValue, "charity-current-value", 0, "Only used for \"charity-*\" events. Manually set the current dollar value for charity events.")
127-
triggerCmd.Flags().IntVar(&charityTargetValue, "charity-target-value", 1500000, "Only used for \"charity-*\" events. Manually set the current dollar value for charity events")
127+
triggerCmd.Flags().IntVar(&charityTargetValue, "charity-target-value", 1500000, "Only used for \"charity-*\" events. Manually set the target dollar value for charity events.")
128128

129129
// retrigger flags
130130
retriggerCmd.Flags().StringVarP(&forwardAddress, "forward-address", "F", "", "Forward address for mock event.")

internal/events/types/follow/follow_event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
3333
Subscription: models.EventsubSubscription{
3434
ID: params.ID,
3535
Status: params.SubscriptionStatus,
36-
Type: "channel.follow",
36+
Type: triggerMapping[params.Transport][params.Trigger],
3737
Version: e.SubscriptionVersion(),
3838
Condition: models.EventsubCondition{
3939
BroadcasterUserID: params.ToUserID,

internal/events/types/stream_change/stream_change_event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
4747
Subscription: models.EventsubSubscription{
4848
ID: params.ID,
4949
Status: params.SubscriptionStatus,
50-
Type: "channel.update",
50+
Type: triggerMapping[params.Transport][params.Trigger],
5151
Version: e.SubscriptionVersion(),
5252
Condition: models.EventsubCondition{
5353
BroadcasterUserID: params.ToUserID,

internal/events/types/user/user_update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
3333
Subscription: models.EventsubSubscription{
3434
ID: params.ID,
3535
Status: params.SubscriptionStatus,
36-
Type: "user.update",
36+
Type: triggerMapping[params.Transport][params.Trigger],
3737
Version: e.SubscriptionVersion(),
3838
Condition: models.EventsubCondition{
3939
UserID: params.ToUserID,

0 commit comments

Comments
 (0)