twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
74 stars 6 forks source link

msg_param_sender_count inaccurate #81

Open BarryCarlyon opened 4 years ago

BarryCarlyon commented 4 years ago

Brief description

I have observed the msg_param_sender_count can be inaccurate when it's a submysterygift

We normally refer to these as a gift bomb, and a gift bomb consists of the header of msg_id submysterygift and a body of the msg_id subgift

In the header the value is correct, but in the body the value is inaccurate

How to reproduce

Log chat for the relevant usernotices

Expected behavior

All messages in the "event" have accurate data

Additional context or questions

Consider this (parsed to JSON) output of a giftbomb of one, (easy to read if you copy/paste to http://json.parser.online.fr/ )

[
{"tags":{"badge_info":"subscriber/2","badges":[["subscriber","0"],["twitchconAmsterdam2020","1"]],"color":"#1E90FF","display_name":"LazyThunder","emotes":true,"flags":true,"id":"704dd312-4765-4354-b745-f93917ada2c3","login":"lazythunder","mod":"0","msg_id":"submysterygift","msg_param_mass_gift_count":"1","msg_param_origin_id":"95\\s71\\sec\\s61\\sbe\\s24\\s6e\\s9f\\s70\\s6b\\s4c\\s46\\s7a\\sb9\\sb9\\sd3\\sfe\\s65\\sd1\\s22","msg_param_sender_count":"1","msg_param_sub_plan":"1000","room_id":"23735582","subscriber":"1","system_msg":"LazyThunder\\sis\\sgifting\\s1\\sTier\\s1\\sSubs\\sto\\sSacriel's\\scommunity!\\sThey've\\sgifted\\sa\\stotal\\sof\\s1\\sin\\sthe\\schannel!","tmi_sent_ts":"1584719101309","user_id":"92065833","user_type":true},"prefix":"tmi.twitch.tv","server":"tmi.twitch.tv","command":"USERNOTICE","rawCommand":"USERNOTICE","commandType":"normal","args":["#sacriel"]}
,
{"tags":{"badge_info":"subscriber/2","badges":[["subscriber","0"],["twitchconAmsterdam2020","1"]],"color":"#1E90FF","display_name":"LazyThunder","emotes":true,"flags":true,"id":"a313c69c-d7f5-49d7-898f-d2efd118df55","login":"lazythunder","mod":"0","msg_id":"subgift","msg_param_months":"2","msg_param_origin_id":"da\\s39\\sa3\\see\\s5e\\s6b\\s4b\\s0d\\s32\\s55\\sbf\\sef\\s95\\s60\\s18\\s90\\saf\\sd8\\s07\\s09","msg_param_recipient_display_name":"pappy_i_am","msg_param_recipient_id":"435807188","msg_param_recipient_user_name":"pappy_i_am","msg_param_sender_count":"0","msg_param_sub_plan_name":"The\\s42nd\\s-\\sThanks\\sfor\\ssubscribing!\\s","msg_param_sub_plan":"1000","room_id":"23735582","subscriber":"1","system_msg":"LazyThunder\\sgifted\\sa\\sTier\\s1\\ssub\\sto\\spappy_i_am!","tmi_sent_ts":"1584719102526","user_id":"92065833","user_type":true},"prefix":"tmi.twitch.tv","server":"tmi.twitch.tv","command":"USERNOTICE","rawCommand":"USERNOTICE","commandType":"normal","args":["#sacriel"]}
]

Note how msg_param_sender_count is 1 in the header but it is 0 in the body

Yeah we can account for it by assuming the count only goes up. But there may be other inaccuracies in this information for other "types" of events.

mauerbac commented 4 years ago

Thanks @BarryCarlyon ! appreciate the clear description. This has been entered as MES-5169

mauerbac commented 4 years ago

Hey @BarryCarlyon - heard back from the team. Investigation is still on-going, but they said "behavior here is intentional to prevent chat from rendering the gift # text for every usernotice of a community gift"

BarryCarlyon commented 4 years ago

If it's intended. Should probably be put in the documentation!