StormyDragon / TwitFix

Fix Twitter video embeds in Discord (and Telegram!)
Do What The F*ck You Want To Public License
11 stars 2 forks source link

Telegram: Multi-image tweets only displaying one image #13

Open Deer-Spangle opened 2 years ago

Deer-Spangle commented 2 years ago

If a multi-image tweet is sent in telegram, ayytwitter only displays the first image. For example: https://twitter.com/NASAPersevere/status/1529966700401025025

image

This screenshot from webk telegram, but mobile client shows the same behaviour. However, webk also only displays the first image for twitter.com links, while the mobile client has a "1 of 3" in the bottom right, and allows clicking the image to view all 3. So I'm not sure whether that's fixable in webk, or whether that's a webk error. But it should be fixed for mobile and desktop clients

StormyDragon commented 2 years ago

As I understand the rich embeds there is support for adding multiple images but the various chat clients don't implement enough of the standard because of the size and resource constraints.

I tried actual multi image embeds in the OpenGraph but discord doesn't support it. I think telegram limits you too just the one picture too.

There are cheaty ways around it to make anything possible.

We need to figure out what is possible to embed. Telegram only has their blog post that they support rich embeds but nobody actually said which embed system they support or to which degree.

The last change i made was to the OpenGraph meta tag, but i don't know yet if this is their primary. There is also Twitters own, and oEmbed, which are the three we currently have in the templates.

Discord reads the oEmbed, i don't think Telegram does.