Mark Tweets that are reported as potentially sensitive with as:sensitive

This commit is contained in:
Miss Pasture 2021-07-17 19:05:10 -04:00
parent e9b24ed91f
commit 3cf3f95ccb
4 changed files with 7 additions and 3 deletions

View file

@ -81,10 +81,10 @@ namespace BirdsiteLive.Domain
to = new[] { to },
cc = cc,
sensitive = false,
sensitive = tweet.IsSensitive,
content = $"<p>{content}</p>",
attachment = Convert(tweet.Media),
tag = extractedTags.tags
tag = extractedTags.tags,
};
return note;

View file

@ -38,7 +38,8 @@ namespace BirdsiteLive.Twitter.Extractors
IsReply = tweet.InReplyToUserId != null,
IsThread = tweet.InReplyToUserId != null && tweet.InReplyToUserId == tweet.CreatedBy.Id,
IsRetweet = tweet.IsRetweet || tweet.QuotedStatusId != null,
RetweetUrl = ExtractRetweetUrl(tweet)
RetweetUrl = ExtractRetweetUrl(tweet),
IsSensitive = tweet.PossiblySensitive
};
return extractedTweet;
@ -125,6 +126,7 @@ namespace BirdsiteLive.Twitter.Extractors
var mediaType = GetMediaType(m.MediaType, mediaUrl);
if (mediaType == null) continue;
var att = new ExtractedMedia
{
MediaType = mediaType,

View file

@ -15,5 +15,6 @@ namespace BirdsiteLive.Twitter.Models
public bool IsThread { get; set; }
public bool IsRetweet { get; set; }
public string RetweetUrl { get; set; }
public bool IsSensitive { get; set; }
}
}

View file

@ -11,5 +11,6 @@
public string Acct { get; set; }
public string ProfileBannerURL { get; set; }
public bool Protected { get; set; }
public bool Sensitive { get; set; }
}
}