twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
72 stars 7 forks source link

resolution_text field missing for channel.unban_request.resolve (accept) event #926

Closed Durss closed 3 months ago

Durss commented 3 months ago

Brief description When accepting an unban request, the resolution_text is missing from the "event" object when accepting an unban request It works when refusing the unban request

How to reproduce Ban a user. Make an unban request from this user. Accept the uban request with a comment

Expected behavior Given the documentation we should get a resolution_text property but we don't

Screenshots

Additional context or questions Here is a full JSON of the event received after accepting the unban request with a comment:

{
  "metadata": {
    "message_id": "5BJ1m69zP2jxyEZ3_RNOftXyTb3GAPC-bFu6RPsc3XQ=",
    "message_type": "notification",
    "message_timestamp": "2024-03-16T14:06:48.888081598Z",
    "subscription_type": "channel.unban_request.resolve",
    "subscription_version": "beta"
  },
  "payload": {
    "subscription": {
      "id": "8b0c9039-fb7a-436b-b8ae-58bb4bb30d0e",
      "status": "enabled",
      "type": "channel.unban_request.resolve",
      "version": "beta",
      "condition": {
        "broadcaster_user_id": "29961813",
        "moderator_user_id": "29961813"
      },
      "transport": {
        "method": "websocket",
        "session_id": "AgoQPiHVBJs-QCqBxcRQGjDEoRIGY2VsbC1j"
      },
      "created_at": "2024-03-16T14:04:06.8377453Z",
      "cost": 0
    },
    "event": {
      "id": "a89d4d69-5515-4a81-b753-dc878832a38c",
      "broadcaster_user_id": "29961813",
      "broadcaster_user_login": "durss",
      "broadcaster_user_name": "Durss",
      "moderator_user_id": null,
      "moderator_user_login": null,
      "moderator_user_name": null,
      "user_id": "647389082",
      "user_login": "durssbot",
      "user_name": "DurssBot",
      "resolution_text": null,
      "status": "approved"
    }
  }
}
BarryCarlyon commented 3 months ago

Err this is a payload from channel.unban not channel.unban_request.resolve

Durss commented 3 months ago

Indeed wrong copy/paste. I updated with the proper JSON. The prop is actually here but "null"

Durss commented 3 months ago

BTW that kinda joins https://github.com/twitchdev/issues/issues/925 about the missing moderator info

BarryCarlyon commented 3 months ago

So yeah dupe of #925 in that case. (should append there mayhaps?)

Durss commented 3 months ago

Done !