A simple tool which lets you scrape twitter accounts and crosspost them to bluesky accounts! Comes with a CLI and a webapp for managing profiles! Works with images/videos/link embeds/threads.

Fix: Enhanced retweet detection using isRetweet flag and text fallback

jack 268c2bcb 078d373d

+10 -1
+10 -1
src/index.ts
··· 99 99 in_reply_to_status_id?: string; 100 100 in_reply_to_user_id_str?: string; 101 101 in_reply_to_user_id?: string; 102 + isRetweet?: boolean; 102 103 user?: { 103 104 screen_name?: string; 104 105 id_str?: string; ··· 256 257 id_str: scraperTweet.id, 257 258 text: scraperTweet.text, 258 259 full_text: scraperTweet.text, 260 + isRetweet: scraperTweet.isRetweet, 259 261 // Construct minimal entities from parsed data 260 262 entities: { 261 263 urls: scraperTweet.urls.map((url: string) => ({ url, expanded_url: url })), ··· 277 279 text: raw.full_text, 278 280 full_text: raw.full_text, 279 281 created_at: raw.created_at, 282 + isRetweet: scraperTweet.isRetweet, 280 283 // biome-ignore lint/suspicious/noExplicitAny: raw types match compatible structure 281 284 entities: raw.entities as any, 282 285 // biome-ignore lint/suspicious/noExplicitAny: raw types match compatible structure ··· 817 820 818 821 if (processedTweets[tweetId]) continue; 819 822 820 - if (tweet.retweeted_status_id_str) { 823 + const isRetweet = tweet.isRetweet || tweet.retweeted_status_id_str || tweet.text?.startsWith('RT @'); 824 + 825 + if (isRetweet) { 821 826 console.log(`[${twitterUsername}] ⏩ Skipping retweet ${tweetId}.`); 827 + if (!dryRun) { 828 + // Save as skipped so we don't check it again 829 + saveProcessedTweet(twitterUsername, bskyIdentifier, tweetId, { skipped: true, text: tweet.text }); 830 + } 822 831 continue; 823 832 } 824 833