Ingest remote attachment width/height

This commit is contained in:
Alex Gleason 2021-05-12 15:38:49 -05:00
commit 4c060ae733
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
5 changed files with 50 additions and 5 deletions

View file

@ -245,6 +245,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
"type" => Map.get(url || %{}, "type", "Link")
}
|> Maps.put_if_present("mediaType", media_type)
|> Maps.put_if_present("width", (url || %{})["width"])
|> Maps.put_if_present("height", (url || %{})["height"])
%{
"url" => [attachment_url],