You should always get cumulative_months but
streak_months` can be ommited.
Resubscribers can choose to not share their streak so you should always get cumulative_months
I’ve not seen any missing cumulative_months
today.
You should be processing only cumulative_months
and streak_months
You may still receive a months
key but that is deprecated in favor of cumulative and streak.
You may receive a payload that doesn’t have streak_months
present as it is optional for a viewer to share their streak.
TLDR: cumulative_months
is always on
Also looks like a Typo in the docs
{
"type": "MESSAGE",
"data": {
"topic": "channel-subscribe-events-v1.44322889",
"message": {
"user_name": "dallas",
"display_name": "dallas",
"channel_name": "twitch",
"user_id": "44322889",
"channel_id": "12826",
"time": "2015-12-19T16:39:57-08:00",
"sub_plan": "Prime"/"1000"/"2000"/"3000",
"sub_plan_name": "Channel Subscription (mr_woodchuck)",
"cumulative-months": 9;
"streak-months": 3,
"context": "sub"/"resub",
"sub_message": {
"message": "A Twitch baby is born! KappaHD",
"emotes": [
{
"start": 23,
"end": 7,
"id": 2867
}]
}
}
}
}
Should be
{
"type": "MESSAGE",
"data": {
"topic": "channel-subscribe-events-v1.44322889",
"message": {
"user_name": "dallas",
"display_name": "dallas",
"channel_name": "twitch",
"user_id": "44322889",
"channel_id": "12826",
"time": "2015-12-19T16:39:57-08:00",
"sub_plan": "Prime"/"1000"/"2000"/"3000",
"sub_plan_name": "Channel Subscription (mr_woodchuck)",
"cumulative_months": 9;
"streak_months": 3,
"context": "sub"/"resub",
"sub_message": {
"message": "A Twitch baby is born! KappaHD",
"emotes": [
{
"start": 23,
"end": 7,
"id": 2867
}]
}
}
}
}