fix retweet text

This commit is contained in:
Nicolas Constant 2021-01-29 01:29:35 -05:00
parent 514b727328
commit e797e7eee0
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -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)