From 6046f10431390fa2ecef4b8d8a95b5d8db03fd2d Mon Sep 17 00:00:00 2001 From: lain Date: Sun, 18 Feb 2018 13:03:40 +0100 Subject: Actually fix incoming attachments. --- lib/pleroma/web/activity_pub/transmogrifier.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 62e43526e..af6b5befc 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -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) -- cgit v1.2.3