Skip to content

Conversation

@BarryCarlyon
Copy link
Contributor

@BarryCarlyon BarryCarlyon commented Jul 2, 2024

Complete the work in #322 as it broke things instead and fix #329

Testing verify trigger and retrigger (on the raid topic at least)

Notable faults/issues

Random ID usage on CP Reward add and TRN Event, this probably needs to be lifted to a field (seperate PR?)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

  • fix: split event message id #322 that was included in the latest release broke trigger/retrigger
  • postbody.subscription.id is blank instead of populated
  • header['twitch-eventsub-message-id'] is blank instead of populated, this was what 322 attempted to fix

Description of Changes:

  • Percolate the work in fix: split event message id #322 so it's actually used properly across all types supported
  • itemID of reward_event.go and transaction_event.go in types used a random RandomGUID at the moment

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

Testing verify trigger and retrigger (on the raid topic at least)

Notable faults/issues

Random ID usage on CP Reward add and TRN Event, this probably needs to be lifted to a field (seperate PR?)
@BarryCarlyon
Copy link
Contributor Author

This seems to have broken the retrigger_even_test though... Having a look :-D

@BarryCarlyon
Copy link
Contributor Author

The fixed broken test was using the subscription ID as the store/retrieval Key which is what 322 tried to fix.

@Xemdo Xemdo self-requested a review July 4, 2024 19:19
@Xemdo Xemdo merged commit 2b10cc2 into twitchdev:main Jul 4, 2024
@Xemdo
Copy link
Contributor

Xemdo commented Jul 7, 2024

Tested --item-id on extension.bits_transaction.create and it seems to be working:

$ ./twitch-cli event trigger transaction --item-id=TEST

{
  "subscription": {
    "id": "6b5b7bda-1dff-fabe-a3e2-2b40c50eec11",
    "status": "enabled",
    "type": "extension.bits_transaction.create",
    "version": "1",
    "condition": {
      "extension_client_id": "gxuerabxs2v7p04d6gi4ob1zx40za2"
    },
    "transport": {
      "method": "webhook",
      "callback": "null"
    },
    "created_at": "2024-07-07T04:22:45.667109775Z",
    "cost": 1
  },
  "event": {
    "id": "e8881664-29b8-a228-8635-b7f1f354ed6b",
    "extension_client_id": "gxuerabxs2v7p04d6gi4ob1zx40za2",
    "broadcaster_user_id": "80885621",
    "broadcaster_user_login": "testBroadcaster",
    "broadcaster_user_name": "testBroadcaster",
    "user_name": "testUser",
    "user_login": "testUser",
    "user_id": "75350923",
    "product": {
      "name": "Test Trigger Item from CLI",
      "sku": "TEST",
      "bits": 100,
      "in_development": true
    }
  }
}

Same for channel.channel_points_custom_reward_redemption.add:

$ ./twitch-cli event trigger channel.channel_points_custom_reward_redemption.add --item-id=TESTTESTTEST

{
  "subscription": {
    "id": "5f19bc21-2bdb-2f81-bf6c-ab63052f0c78",
    "status": "enabled",
    "type": "channel.channel_points_custom_reward_redemption.add",
    "version": "1",
    "condition": {
      "broadcaster_user_id": "73985649"
    },
    "transport": {
      "method": "webhook",
      "callback": "null"
    },
    "created_at": "2024-07-07T04:24:49.78028451Z",
    "cost": 0
  },
  "event": {
    "id": "4148a820-405b-c633-a231-a9738bf60100",
    "broadcaster_user_id": "73985649",
    "broadcaster_user_login": "testBroadcaster",
    "broadcaster_user_name": "testBroadcaster",
    "user_id": "37829274",
    "user_login": "testFromUser",
    "user_name": "testFromUser",
    "user_input": "Test Input From CLI",
    "status": "unfulfilled",
    "reward": {
      "id": "TESTTESTTEST",
      "title": "Test Reward from CLI",
      "cost": 150,
      "prompt": "Redeem Your Test Reward from CLI"
    },
    "redeemed_at": "2024-07-07T04:24:49.78028451Z"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Verification fails for "event trigger" (but passed for "event verify-subscription") - regression in 1.1.23 against the 1.1.22

2 participants