twitchdev / issues

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

channel.chat_settings.update - follower_mode_duration_minutes is 0 instead of the actual duration #885

Closed iProdigy closed 3 months ago

iProdigy commented 6 months ago

Brief description

When followers-only mode is enabled (and set to a value greater than 0 minutes), channel.chat_settings.update fires with "follower_mode_duration_minutes": 0

How to reproduce

  1. Subscribe to channel.chat_settings.update
  2. Execute /followers 1m (or whatever duration)
  3. Read eventsub payload

Expected behavior

follower_mode_duration_minutes should report the correct duration (instead of only 0)

Additional context or questions

Sample payload

{
  "metadata": {
    "message_id": "N0G3W-__KEwbeZ_a46la66__8xRdMkrpTpFwlf9e8zw=",
    "message_type": "notification",
    "message_timestamp": "2024-01-09T05:02:02.387625748Z",
    "subscription_type": "channel.chat_settings.update",
    "subscription_version": "beta"
  },
  "payload": {
    "subscription": {
      "id": "c6cd88fa-0e14-4a4a-8e38-3e62111240be",
      "status": "enabled",
      "type": "channel.chat_settings.update",
      "version": "beta",
      "condition": {
        "broadcaster_user_id": "***",
        "user_id": "***"
      },
      "transport": {
        "method": "websocket",
        "session_id": "AgoQEko_jFNmTD25kNmNCw64-hIGY2VsbC1i"
      },
      "created_at": "2024-01-09T05:01:00.01324041Z",
      "cost": 0
    },
    "event": {
      "broadcaster_user_id": "***",
      "broadcaster_user_login": "***",
      "broadcaster_user_name": "***",
      "emote_mode": true,
      "follower_mode": true,
      "follower_mode_duration_minutes": 0,
      "slow_mode": false,
      "slow_mode_wait_time_seconds": null,
      "subscriber_mode": false,
      "unique_chat_mode": false
    }
  }
}
theca11 commented 4 months ago

Hit this problem today testing v1 of the topic. In fact the issue is that it's returning hours instead of minutes. So if you set anything below 60 it does return 0, set 60 and it will become 1.

Xemdo commented 3 months ago

Should be fixed