Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

small update to tweet component

Steven Tey1a8c14743b6e
diff --git a/lib/twitter/get-tweet.ts b/lib/twitter/get-tweet.ts
index 08b5094943..742ef8a565 100644
--- a/lib/twitter/get-tweet.ts
+++ b/lib/twitter/get-tweet.ts
@@ -71,7 +71,7 @@ export const getTweet = async (id: string) => {
url_meta:
media || referenced_tweets.length > 0 || !tweet.data?.entities?.urls
? null
- : tweet.data?.entities?.urls[0],
+ : tweet.data?.entities?.urls.at(-1), // take the last unfurled URL in the tweet (similar to Twitter's behavior)
video:
media &&
media[0] &&
diff --git a/lib/twitter/index.ts b/lib/twitter/index.ts
index c0bb4c4528..76270723f4 100644
--- a/lib/twitter/index.ts
+++ b/lib/twitter/index.ts
@@ -10,7 +10,7 @@ export const homepageTweets = [
"1573744854655533069",
"1586745532386578433",
"1582956754425421825",
- "1586262340949139456",
+ "1636708209057746945",
"1632125000386854912",
"1581017931043196928",
"1626946633207357440",