Remove deprecated video property

This commit is contained in:
dangered wolf 2023-04-24 23:33:15 -04:00
parent e40a27ac83
commit 58537e49c0
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58
3 changed files with 1 additions and 3 deletions

View file

@ -297,7 +297,7 @@ export const handleStatus = async (
}
/* If we have no media to display, instead we'll display the user profile picture in the embed */
if (!tweet.media?.video && !tweet.media?.photos && !flags?.textOnly) {
if (!tweet.media?.videos && !tweet.media?.photos && !flags?.textOnly) {
headers.push(
/* Use a slightly higher resolution image for profile pics */
`<meta property="og:image" content="${tweet.author.avatar_url?.replace(

View file

@ -128,7 +128,6 @@ interface APITweet {
media?: {
external?: APIExternalMedia;
photos?: APIPhoto[];
video?: APIVideo;
videos?: APIVideo[];
mosaic?: APIMosaicPhoto;
};

View file

@ -129,7 +129,6 @@ test('API fetch video Tweet', async () => {
expect(tweet.created_timestamp).toEqual(1492543804);
expect(tweet.lang).toEqual('en');
expect(tweet.replying_to).toBeNull();
expect(tweet.media?.video).toBeTruthy();
const video = tweet.media?.videos?.[0] as APIVideo;
expect(video.url).toEqual(
'https://video.twimg.com/amplify_video/854415175776059393/vid/720x720/dNEi0crU-jA4mTtr.mp4'