Open StormyDragon opened 2 years ago
I would like to add a vote for Telegram to be a supported target for embedding. Twitter embedding in telegram has been broken for some time, and folks started using fxtwitter. The only remaining issue I've seen on telegram, when using ayytwitter.com links, is that videos embed, but don't get the tweet text also
Oh definitely; I'm currently setting up a bunch of experiments to probe what I'm able to do with the embed targets. They all seem to have different ideas of what to present, some even have overrides for specific websites.
My goal is separating embed information for the various sites such that it is clear exactly which information we need to send them to generate a given embed and so that eventual changes to an embed system for one site does not give a bad experience for another.
@Deer-Spangle I've added the description field to the video embed, I checked in Discord and Telegram and it does not look like it had any adverse effects, let me know if it broke something.
It seems to work! Wow, thanks for the fast work there! I have noticed some gif tweets not working, but not sure whether they worked before (but they work with normal twitter.com links, and seem to work with other forks) An example: https://ayytwitter.com/Tangeluscious/status/1533257180379549697 [technically sfw, but mature]
@Deer-Spangle I've added the description field to the video embed, I checked in Discord and Telegram and it does not look like it had any adverse effects, let me know if it broke something.
in my experiments, adding the description field in videos only had a bad effect on specifically mobile discord embeds ( this is because of the whole no-descriptions-for-desktop-embeds bug, causing mobile embeds to use both the title tweet text and description field tweet text ) but if you are serving separate embeds specifically for telegram I would expect it to work fine
Like this. Yup, I broke it. :>
Ah, whoops!
It seems like we need a list of manual QA tests at the very least, a matrix of them I guess? Like, example tweets with videos, descriptions, single image, multiple images, gifs, text only, etc And then a list of clients: Discord desktop, discord web, discord mobile, telegram desktop, telegram mobile, telegram webk/webz? And then see what the support is like for each of them. I don't think we can really automate it, unfortunately.
Does that sound handy? I could give it a go if you want
I tried automating Telegram using playwright
but it's being a quite a finicky beast.
I think it would be a valuable information gathering exercise, which clients, variants, and which outputs do we actually generate.
I'm working to have separate templates for each client such that we don't have to worry about weird oddities stepping over one another, instead of trying to fit everything into a single megatemplate that tries to meet the lowest common denominator.
Yeah, I suspect automation would be finicky and unreliable, to be honest?
Perhaps one could quite easily automate a small script that creates an tweet for each example, and sends them into a telegram chat or discord chat, that would be helpful (to ensure web preview isn't using a cached result) But as for checking, it feels like manually giving each link a peek in each client would be the most efficient way to go. A few minutes maybe, vs the maintenance burden of an e2e suite that relies on external applications. In the longer run, I would normally recommend test automation! But there is always the chance that discord and telegram actually buck up their ideas and get this stuff actually fixed on their end. So doesn't seem worth tooooo much to do test automation.
And it sounds like generating a different template for telegram vs discord would be ideal, yeah!
I wouldn't mind throwing together an example tweet creation script, and some testing playbook and little report table if you want. I would love to help out
I will value all information that probes the capabilities of our target clients. :)
We need to support:
I think these are the potential tweets that are described in the API.
Yeah, the API makes clear that tweets can have 1-4 images, or 1 video, or 1 gif. I'm sure I recall mention of multi-video tweets, but the API seems clear about it, and I've never seen proof of one when I try and find one.. I'm not sure their definition of gif either, to be honest. (I've spent a long time probing the limits of "gifs" for telegram, but maybe the twitter actually wants them uploaded as old fashioned .gif files. I can't find good data on that) I read of those place and profile tweets too, but haven't seen many around
Okay, I'll try and whip up a script, at least
In order to carve out a path for future development of this project, we need to make clear what this project is. It started as a way to fix an issue where a twitter link posted to discord would display in the embed a video that would display a message that it could not be played.
Discord Embedding
I think this problem has been fixed in Discord; but it is done in a strange way where Discord will first try to play using its own player, then when the player enters a failure state it appears that Discord attempts to load another playback mechanism, eventually falling back to Twitters own player in an
Not about videos no more
Other changes have been made to the TwitFix codebase in the past months and it appears that the overarching purpose is to provide a better embedding experience which better fits the live chat environment a given tweet is embedded into.
Forging ahead.