FixTweet / FxTwitter

Fix broken Twitter/X embeds! Use multiple images, videos, polls, translations and more on Discord, Telegram and others
https://fxtwitter.com
MIT License
2.62k stars 77 forks source link

Discord spoilers embed the GitHub, not the Tweet #482

Closed Seltyk closed 11 months ago

Seltyk commented 11 months ago

A Discord message containing a spoiler'd link should embed and spoiler the link target. However, fixupx.com and fxtwitter.com instead embed the FixTweet project GitHub rather than the intended Tweet. The link, of course, works as expected, as does Discord's spoiler blur.

Curiously, vxtwitter.com embeds the Tweet as one would expect.

Example: image

dangeredwolf commented 11 months ago

That is odd. I quickly pin-pointed that this is because Discord is actually sending us the URL with || after it because of the spoiler, so if you put https://fxtwitter.com/jack/status/20 in spoilers, what we actually receive is https://fxtwitter.com/jack/status/20||. If this ever worked before, it was before with our old routing implementation which had a bit of a looser configuration, but it seems we'll have to fix this to make it work. Why Discord is parsing the spoiler syntax in the URL is beyond me.

dangeredwolf commented 11 months ago

The fix should be live now, but you'll have to regenerate your currently broken embeds. You can simply change the username to i or add a query string (?asdf) at the end to regenerate the embed.

Seltyk commented 11 months ago

Confirmed fixed.