From e797e7eee06e261e42c299d2ab29b11c863dcd1d Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Fri, 29 Jan 2021 01:29:35 -0500 Subject: [PATCH] fix retweet text --- src/BirdsiteLive.Twitter/Extractors/TweetExtractor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/BirdsiteLive.Twitter/Extractors/TweetExtractor.cs b/src/BirdsiteLive.Twitter/Extractors/TweetExtractor.cs index 5f339fd..b2c00d7 100644 --- a/src/BirdsiteLive.Twitter/Extractors/TweetExtractor.cs +++ b/src/BirdsiteLive.Twitter/Extractors/TweetExtractor.cs @@ -50,7 +50,12 @@ namespace BirdsiteLive.Twitter.Extractors var tweetUrls = tweet.Media.Select(x => x.URL).Distinct(); var message = tweet.FullText; foreach (var tweetUrl in tweetUrls) - message = message.Replace(tweetUrl, string.Empty).Trim(); + { + if(tweet.IsRetweet) + message = tweet.RetweetedTweet.FullText.Replace(tweetUrl, string.Empty).Trim(); + else + message = message.Replace(tweetUrl, string.Empty).Trim(); + } if (tweet.QuotedTweet != null) message = $"[Quote {{RT}}]{Environment.NewLine}{message}"; if (tweet.IsRetweet)