lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.7k stars 260 forks source link

[1.50.5] - Missing msg_id field for sub messages #393

Closed TheMadog24 closed 1 year ago

TheMadog24 commented 1 year ago

Checklist

Describe your issue here

When downloading chat as a JSON file, the "msg_id": field is now null for every message. Before the update, there were different values here, including sub, resub, subgift and submysterygift.

These values are important to me, as I am making a program that uses these files for a real-time chat replay system.

TheMadog24 commented 1 year ago

On top of this, I also noticed there are some fields that are missing, that are normally present, such as:

"msg-param-cumulative-months":
"msg-param-months":
"msg-param-multimonth-duration":
"msg-param-multimonth-tenure":
"msg-param-should-share-streak":
"msg-param-sub-plan":
"msg-param-sub-plan-name":
"msg-param-was-gifted":
lay295 commented 1 year ago

Yeah, a change Twitch made to their API. The v5 chat API no longer populates those fields and in the new GQL API they're using it doesn't tell me anything about it being a sub message either. Nothing I can really do about it besides "guess" from the formatting of the message if it's a sub message or not. Kinda a pain.

It looks like they're going to kill the old API sooner rather than later. I'm going to convert the new format to the old format, but those msg_id fields will still not be populated (unless Twitch eventually decides to start sharing that info again)

Prepare for v5 chat API to go offline: https://github.com/lay295/TwitchDownloader/commit/4ea98fef08b1f16272921751692dcc4b84778fd6

Comment from #347

Yeah, kinda forgot about it when rewriting the rendering code.

Added it back now and fixed it. Looks like the twitch chat API is no longer letting us know when it's a sub message though with the v5 API, and in the new GQL query they're using it doesn't tell us anything either.

image

I just guess if it's a sub message now since the API is no longer telling us. I still have to double check if it tells us if it's a highlighted message. If they're not telling us it's a sub message anymore I doubt it though.

https://github.com/lay295/TwitchDownloader/blob/59741ffad607fea3b49eadc279ccbd70200c9ffa/TwitchDownloaderCore/ChatRenderer.cs#L386-L393

image

TheMadog24 commented 1 year ago

I see... But "gifted" and "mysterygift" sub messages are still not included, I assume. Or they are just broken image No formatting for them.

lay295 commented 1 year ago

Yep, just haven't had time to find all iterations of the sub messages. I'll update it later today. I also don't know if Twitch still tells us if a message is highlighted I have to check.