Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message fragments for channel.suspicious_user.message are sparsely populated #947

Open
iProdigy opened this issue Apr 29, 2024 · 1 comment
Labels
product: eventsub EventSub (Webhooks and WebSockets) ticketed Has been given an internal tracking ticket

Comments

@iProdigy
Copy link

Brief description

For channel.suspicious_user.message, fragment.type == "text" never occurs, despite that being a documented possibility.

Thus, the fragments array does not behave like fragments for every other chat eventsub topic and the corresponding pubsub topic (low-trust-users), so it is not possible to reconstruct the full message with the fragments array (as is usually possible).

EventSub example:

{
  "message_id": "71a1fdf9-7a60-4ca8-a2cc-3866595c6efe",
  "text": "hello @djclancy from https://twitch.tv/ xd Kappa yo",
  "fragments": [
    {
      "type": "emote",
      "text": "Kappa",
      "Cheermote": {
        "prefix": "",
        "bits": 0,
        "tier": 0
      },
      "emote": {
        "id": "25",
        "emote_set_id": "0"
      }
    }
  ]
}

PubSub example:

{
  "text": "hello @djclancy from https://twitch.tv/ xd Kappa yo",
  "fragments": [
    {
      "text": "hello "
    },
    {
      "text": "@djclancy",
      "user_mention": {
        "userID": "268669435",
        "login": "djclancy",
        "display_name": "DJClancy"
      }
    },
    {
      "text": " from "
    },
    {
      "text": "https://twitch.tv/"
    },
    {
      "text": " xd "
    },
    {
      "text": "Kappa",
      "emoticon": {
        "emoticonID": "25",
        "emoticonSetID": "0"
      }
    },
    {
      "text": " yo"
    }
  ]
}

How to reproduce

  1. Subscribe to channel.suspicious_user.message
  2. Send a chat message that includes non-emote text

Expected behavior

The fragments array should include each text component, not just emotes/cheermotes (just like the pubsub equivalent, and other chat eventsub topics)

Additional context or questions

This bug fix can occur in v1 or v2. If a v2 topic is created, please fix the casing for the Cheermote field name (should be a lowercase C)... also it'd be nice if message_id was moved out of the message object for consistency with other chat eventsub topics

@iProdigy iProdigy added the product: eventsub EventSub (Webhooks and WebSockets) label Apr 29, 2024
@Xemdo Xemdo added the ticketed Has been given an internal tracking ticket label May 15, 2024
@Xemdo
Copy link

Xemdo commented May 15, 2024

Ticketed internally as APIPLAT-4759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: eventsub EventSub (Webhooks and WebSockets) ticketed Has been given an internal tracking ticket
Projects
None yet
Development

No branches or pull requests

2 participants