This media is not supported in your browser
VIEW IN TELEGRAM
Another 🔗 trick you probably didn't notice: if text tweet contains a link, I would like Telegram to generate a preview for it. But Telegram generates a preview for the first link in the message.
So, if text tweet contains a link, it becomes the first link of the message with the invisible character. You can try finding it. :)
So, if text tweet contains a link, it becomes the first link of the message with the invisible character. You can try finding it. :)
While work is ongoing, a bit of explanation on the major difference between Twitter's API v1 and v2.
Basically, V1 used to be a full service furniture shop: you order a bunch of kitchen sets, and they come as sets. This means that each set would contain a table, corresponding chairs, and matching chair pillows (tweet, its attachments and references).
Twitter API V2 serves you more IKEA style: you receive a bunch of tables, and a bunch of chairs. Each table lists chair codes, but it's up to you to find corresponding chairs in the delivery. In some cases, you need to order chair pillows separately, when gathering the set together.
I guess API v2 had same reasons as IKEA: it is much easier to serve this way.
Anyway, I'm on my way - the work is progressing. 🙂
Basically, V1 used to be a full service furniture shop: you order a bunch of kitchen sets, and they come as sets. This means that each set would contain a table, corresponding chairs, and matching chair pillows (tweet, its attachments and references).
Twitter API V2 serves you more IKEA style: you receive a bunch of tables, and a bunch of chairs. Each table lists chair codes, but it's up to you to find corresponding chairs in the delivery. In some cases, you need to order chair pillows separately, when gathering the set together.
I guess API v2 had same reasons as IKEA: it is much easier to serve this way.
Anyway, I'm on my way - the work is progressing. 🙂
This media is not supported in your browser
VIEW IN TELEGRAM
Fingers crossed, it's ready. It will be sending for a while to a secret Telegram channel, so I can verify that messages sent are identical.
And in some point of time later, when I gain confidence, I will just redirect the new version of the bot to use proper Telegram channels. In the best case, you won't notice anything... except multiple videos in some messages. :)
And in some point of time later, when I gain confidence, I will just redirect the new version of the bot to use proper Telegram channels. In the best case, you won't notice anything... except multiple videos in some messages. :)
Twitter Feeds Discussion
Fingers crossed, it's ready. It will be sending for a while to a secret Telegram channel, so I can verify that messages sent are identical. And in some point of time later, when I gain confidence, I will just redirect the new version of the bot to use proper…
Or, if I try with the tweet which was the reason I initiated this whole migration...
Well, I was too optimistic. One of the most complex features of consolidating self-replies (or threads) into single messages still misbehaves: instead of a single message, like on the first picture, the bot sends multiple messages, like on the second picture.
I will be debugging it further, but most probably later. :)
I will be debugging it further, but most probably later. :)
Twitter Feeds Discussion
Well, I was too optimistic. One of the most complex features of consolidating self-replies (or threads) into single messages still misbehaves: instead of a single message, like on the first picture, the bot sends multiple messages, like on the second picture.…
OK, it looks like thread-consolidating issue is solved (it was specific to the testing sandbox channel).
I have switched now the new Twitter API v2 bot to post to main channels, and the old version to post to sandbox channel - just to verify the consistency between them. 🤞 Hopefully, you won't notices any changes except seeing tweets with multiple videos.
Please open Telegram to view this post
VIEW IN TELEGRAM
Couple of cosmetic updates today.
1. When posting the quoted tweet, bot removes the link to the original tweet from the text. The format for the quote and retweet is more compact.
2. When the tweet contains a link, the link is replaced from t.co format to the original link.
1. When posting the quoted tweet, bot removes the link to the original tweet from the text. The format for the quote and retweet is more compact.
2. When the tweet contains a link, the link is replaced from t.co format to the original link.
And finally, the small thing which annoyed me for quite a while: tweets with media attached have links to this media page in Twitter. Basically, the tweet itself.
Removing this link requires 1 line change in the 3rd party library I use. The change is proposed to the library maintainer, but meanwhile, I have done it locally and deployed a new version of the bot.
Removing this link requires 1 line change in the 3rd party library I use. The change is proposed to the library maintainer, but meanwhile, I have done it locally and deployed a new version of the bot.
Some of you might have noticed this message being posted (and deleted) several times. No, this isn't another M113A3 incident.
The reason is that the tweet is both the reply and the quote. It was only posted as a quote, and I was trying to find out why.
On top of that, the link to the quoted tweet (twitter.com/poetaetrr/stat…) was not removed because it contained some query parameters (?t=...&s=...)
The fix is already there. Moreover, it also removes trailing empy lines after removing the link to quoted tweets. You can see how this looks like from now on on the screenshot.
The reason is that the tweet is both the reply and the quote. It was only posted as a quote, and I was trying to find out why.
On top of that, the link to the quoted tweet (twitter.com/poetaetrr/stat…) was not removed because it contained some query parameters (?t=...&s=...)
The fix is already there. Moreover, it also removes trailing empy lines after removing the link to quoted tweets. You can see how this looks like from now on on the screenshot.
Well, with the latest news I'm contemplating now, whether it makes sense to continue any development or just wait for the clarity. 🤦♂
I'm so happy I'm not working at Twitter. 😆
https://www.nytimes.com/2022/11/11/technology/elon-musk-twitter-takeover.html?unlocked_article_code=AAAAAAAAAAAAAAAACEIPuonUktbfqYhlSVUaAibJUNMnqBqCgvfeh7E4gXm7KTWOSnNe0OUJH4WavlvEZqdkedYpmTSHQdsLeJkeeMtP9M4NdUp8V1vv5ZKehJUOJyhypYzsD2o_gMOIV71i_Xq3NTXhbe4jnbT67krWYTa-W6bahiAlNx8l9cU-DSyi2XQOz6fBFeNzy4M-ia9nXsYmMG9GMCqavPDoCAF9OMGFbnzc6wo0W-JbWlLDjILWquJAIEgJVwWwHD4o6n086dhcJNsUIK34ShUic8P9irwQYXd6PIfESts0aVSRnu2b8wj7vw&referringSource=articleShare
I'm so happy I'm not working at Twitter. 😆
https://www.nytimes.com/2022/11/11/technology/elon-musk-twitter-takeover.html?unlocked_article_code=AAAAAAAAAAAAAAAACEIPuonUktbfqYhlSVUaAibJUNMnqBqCgvfeh7E4gXm7KTWOSnNe0OUJH4WavlvEZqdkedYpmTSHQdsLeJkeeMtP9M4NdUp8V1vv5ZKehJUOJyhypYzsD2o_gMOIV71i_Xq3NTXhbe4jnbT67krWYTa-W6bahiAlNx8l9cU-DSyi2XQOz6fBFeNzy4M-ia9nXsYmMG9GMCqavPDoCAF9OMGFbnzc6wo0W-JbWlLDjILWquJAIEgJVwWwHD4o6n086dhcJNsUIK34ShUic8P9irwQYXd6PIfESts0aVSRnu2b8wj7vw&referringSource=articleShare
NY Times
Two Weeks of Chaos: Inside Elon Musk’s Takeover of Twitter
Mr. Musk ordered immediate layoffs, fired executives by email and laid down product deadlines, transforming the company.
The bot generally sends photos and videos by passing URLs to Telegram. Telegram then itself retrieves photos and videos. But sometimes Telegram fails, and I don't know why. Examples are here and here.
Now, in this case the bot tries to actually download failed files and upload them to the Telegram. In the sandbox, it worked with the tweets above. Let's see whether it will work in the real life.
Just to make these cases visible, bot posts these media with "(@)" prefix, not the usual "(#)". Here is an example.
There are still scenarios when this will fail. Twitter allows uploading videos up to 250Mb, and Telegram only up to 50Mb. But I will be solving this issue only when it starts appearing on the regular basis.
Now, in this case the bot tries to actually download failed files and upload them to the Telegram. In the sandbox, it worked with the tweets above. Let's see whether it will work in the real life.
Just to make these cases visible, bot posts these media with "(@)" prefix, not the usual "(#)". Here is an example.
There are still scenarios when this will fail. Twitter allows uploading videos up to 250Mb, and Telegram only up to 50Mb. But I will be solving this issue only when it starts appearing on the regular basis.
There was a duplicate (already removed) of this post. I've started investigating this while having M113A3 incident flashbacks.
Twitter API had connection time outs for about an hour, thus resulting in Lambda timeout. The Lambda timeout ment that bot didn't save the posted tweet, so it posted it again.
Looks like an occasional hiccup. I still need to think, whether it make sense to save the last posted tweet as soon as it's posted.
Twitter API had connection time outs for about an hour, thus resulting in Lambda timeout. The Lambda timeout ment that bot didn't save the posted tweet, so it posted it again.
Looks like an occasional hiccup. I still need to think, whether it make sense to save the last posted tweet as soon as it's posted.
Telegram
Ukraine Weapons Tracker - Backup
(#) #Ukraine: The first photo of a Polish 🇵🇱 S-125 Newa SC air-defense system in use with the Ukrainian army. Main difference of the Polish modernization is the WZT-1 tank chassis and updated electronics.
Previously Poland didn't report any deliveries of…
Previously Poland didn't report any deliveries of…
I realized that there were no post in @UAWeapons since 1 Feb 2023 to 8 Feb 2023.
Short investigation revealed that the bot failed posting this tweet.
Quick fix: marking this tweet as posted, so it's skipped.
Long term fix needs proper investigation.
Short investigation revealed that the bot failed posting this tweet.
Quick fix: marking this tweet as posted, so it's skipped.
Long term fix needs proper investigation.
Twitter
Location:
https://t.co/m7mQlQwF6e
https://t.co/m7mQlQwF6e