Skip to content

Commit

Permalink
Merge pull request #205 from ri72miieop/TES
Browse files Browse the repository at this point in the history
Fix import of tweet_urls for RTs
  • Loading branch information
TheExGenesis authored Jan 30, 2025
2 parents f945a3f + 5edbb95 commit a735e0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-server/db_insert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const processAndInsertTweetEntities = async (
const tweetUrls = tweets.flatMap((tweet) =>
tweet.entities.urls.map((url: any) => ({
url: url.url,
expanded_url: url.expanded_url || '',
expanded_url: url.expanded_url,
display_url: url.display_url || '',
tweet_id: tweet.id_str,
})),
Expand Down
4 changes: 4 additions & 0 deletions supabase/migrations/20250128204847_fix_import_tweet_urls.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--RTs apparently have no expanded_url

ALTER TABLE public.tweet_urls
ALTER COLUMN expanded_url DROP NOT NULL;

0 comments on commit a735e0a

Please sign in to comment.