From 3dc9889725435e7308a636ec5c6f077e0a255bfb Mon Sep 17 00:00:00 2001 From: Alessio Date: Wed, 21 Jun 2023 13:35:16 -0300 Subject: [PATCH] Fetch tombstoned users that are partially re-assembled using reply-joining --- scraper/tweet_trove.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scraper/tweet_trove.go b/scraper/tweet_trove.go index 602c741..d5ad253 100644 --- a/scraper/tweet_trove.go +++ b/scraper/tweet_trove.go @@ -64,9 +64,20 @@ func (t1 *TweetTrove) MergeWith(t2 TweetTrove) { func (trove *TweetTrove) FetchTombstoneUsers() { for _, handle := range trove.TombstoneUsers { // Skip fetching if this user is already in the trove - _, already_fetched := trove.FindUserByHandle(handle) + user, already_fetched := trove.FindUserByHandle(handle) + if already_fetched { - continue + // If the user is already fetched and it's an intact user, don't fetch it again + if user.JoinDate.Unix() != (Timestamp{}).Unix() { + log.Debugf("Skipping %q due to intact user", handle) + continue + } + + // A user needs a valid handle or ID to fetch it by + if user.IsIdFake && user.Handle == "" { + log.Debugf("Skipping %q due to completely unknown user (not fetchable)", handle) + continue + } } log.Debug("Getting tombstone user: " + handle)