Chatterino / chatterino2

Chat client for https://twitch.tv
MIT License
1.98k stars 444 forks source link

`player.twitch.tv` URLs require an unnecessary redirect #5317

Closed Felanbird closed 3 months ago

Felanbird commented 3 months ago

Back in 2020 we were required to add &parent=twitch.tv to these URLs as they stopped working without it, sometime after this Twitch changed the scheme. While our version of the URL has continued to work, Twitch could stop offering us the redirect and we'll end up with broken URLs again. Also i'm sick of seeing the redirect

wrong (what we do): https://player.twitch.tv/?parent=twitch.tv&channel=pajlada correct: https://player.twitch.tv/?channel=pajlada&parent=twitch.tv

We talked about this years ago in chat, and IIRC pajlada wanted all of these to be handled in a singular way, so that should be done instead of just changing the existing 3 separate URLs

https://github.com/Chatterino/chatterino2/blob/dd62707d535cd556f89ee3080ac234cf2ba5c426/src/singletons/Toasts.cpp#L180-L182 https://github.com/Chatterino/chatterino2/blob/dd62707d535cd556f89ee3080ac234cf2ba5c426/src/widgets/splits/Split.cpp#L824-L827 https://github.com/Chatterino/chatterino2/blob/dd62707d535cd556f89ee3080ac234cf2ba5c426/src/providers/twitch/TwitchChannel.cpp#L87-L88

iProdigy commented 3 months ago

Is there actually any redirect happening here?

curl -I -X GET https://player.twitch.tv/?parent=twitch.tv&channel=pajlada

HTTP/1.1 200 OK

seems like the query params are just sorted by client-side js for whatever reason

Felanbird commented 3 months ago

well i'm sick of seeing it either way

Felanbird commented 3 months ago

5326