- ActivityPub C2S: follower/following collection pages being inaccessible even when authentifucated if `hide_followers`/ `hide_follows` was set
- Existing user id not being preserved on insert conflict
- Rich Media: Parser failing when no TTL can be found by image TTL setters
+- Rich Media: The crawled URL is now spliced into the rich media data.
- ActivityPub S2S: sharedInbox usage has been mostly aligned with the rules in the AP specification.
### Added
html
|> maybe_parse()
+ |> Map.put(:url, url)
|> clean_parsed_data()
|> check_parsed_data()
rescue
card_data = %{
"image" => "http://ia.media-imdb.com/images/rock.jpg",
- "provider_name" => "www.imdb.com",
- "provider_url" => "http://www.imdb.com",
+ "provider_name" => "example.com",
+ "provider_url" => "https://example.com",
"title" => "The Rock",
"type" => "link",
- "url" => "http://www.imdb.com/title/tt0117500/",
+ "url" => "https://example.com/ogp",
"description" =>
"Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.",
"pleroma" => %{
"image" => "http://ia.media-imdb.com/images/rock.jpg",
"title" => "The Rock",
"type" => "video.movie",
- "url" => "http://www.imdb.com/title/tt0117500/",
+ "url" => "https://example.com/ogp",
"description" =>
"Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer."
}
"title" => "Pleroma",
"description" => "",
"image" => nil,
- "provider_name" => "pleroma.social",
- "provider_url" => "https://pleroma.social",
- "url" => "https://pleroma.social/",
+ "provider_name" => "example.com",
+ "provider_url" => "https://example.com",
+ "url" => "https://example.com/ogp-missing-data",
"pleroma" => %{
"opengraph" => %{
"title" => "Pleroma",
"type" => "website",
- "url" => "https://pleroma.social/"
+ "url" => "https://example.com/ogp-missing-data"
}
}
}
test "doesn't just add a title" do
assert Pleroma.Web.RichMedia.Parser.parse("http://example.com/non-ogp") ==
- {:error, "Found metadata was invalid or incomplete: %{}"}
+ {:error,
+ "Found metadata was invalid or incomplete: %{url: \"http://example.com/non-ogp\"}"}
end
test "parses ogp" do
description:
"Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.",
type: "video.movie",
- url: "http://www.imdb.com/title/tt0117500/"
+ url: "http://example.com/ogp"
}}
end
description:
"Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.",
type: "video.movie",
- url: "http://www.imdb.com/title/tt0117500/"
+ url: "http://example.com/ogp-missing-title"
}}
end
site: "@flickr",
image: "https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg",
title: "Small Island Developing States Photo Submission",
- description: "View the album on Flickr."
+ description: "View the album on Flickr.",
+ url: "http://example.com/twitter-card"
}}
end
thumbnail_width: 150,
title: "Bacon Lollys",
type: "photo",
- url: "https://farm4.staticflickr.com/3040/2362225867_4a87ab8baf_b.jpg",
+ url: "http://example.com/oembed",
version: "1.0",
web_page: "https://www.flickr.com/photos/bees/2362225867/",
web_page_short_url: "https://flic.kr/p/4AK2sc",