mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-07 11:30:53 +01:00
Remove deprecated video property
This commit is contained in:
parent
e40a27ac83
commit
58537e49c0
3 changed files with 1 additions and 3 deletions
|
@ -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(
|
||||
|
|
1
src/types/types.d.ts
vendored
1
src/types/types.d.ts
vendored
|
@ -128,7 +128,6 @@ interface APITweet {
|
|||
media?: {
|
||||
external?: APIExternalMedia;
|
||||
photos?: APIPhoto[];
|
||||
video?: APIVideo;
|
||||
videos?: APIVideo[];
|
||||
mosaic?: APIMosaicPhoto;
|
||||
};
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue