fix getTweet 3

This commit is contained in:
Vincent Cloutier 2022-05-13 18:58:31 -04:00
parent c924d3649d
commit 92aa9388fe

View file

@ -172,8 +172,12 @@ namespace BirdsiteLive.Twitter
foreach (JsonElement m in attachments.GetProperty("media_keys").EnumerateArray())
{
var mediaInfo = media.EnumerateArray().Where(x => x.GetProperty("media_key").GetString() == m.GetString()).First();
var url = mediaInfo.GetProperty("url").GetString();
var mediaType = mediaInfo.GetProperty("type").GetString();
if (mediaType != "photo")
{
continue;
}
var url = mediaInfo.GetProperty("url").GetString();
extractedMedia.Append(
new ExtractedMedia
{