Actually fix incoming attachments.
This commit is contained in:
parent
6352dffd13
commit
6046f10431
3 changed files with 14 additions and 3 deletions
|
|
@ -17,9 +17,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
end
|
||||
|
||||
def fix_attachments(object) do
|
||||
attachments = object["attachment"] || []
|
||||
attachments = (object["attachment"] || [])
|
||||
|> Enum.map(fn (data) ->
|
||||
url = [%{"type" => "Link", "mediaType" => data["mediaType"], "url" => data["url"]}]
|
||||
url = [%{"type" => "Link", "mediaType" => data["mediaType"], "href" => data["url"]}]
|
||||
Map.put(data, "url", url)
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue