aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-03-19 15:08:49 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-03-19 15:39:11 +0100
commitf9d622d25a744f58fbaf8370ad4435597bb15bf0 (patch)
treed389edc6f292a2573303e69a99bc90a53f227039 /lib
parentd3cf7e19fbe089b3a6d62d6a26f3dfc866a6669d (diff)
downloadpleroma-f9d622d25a744f58fbaf8370ad4435597bb15bf0.tar.gz
WIP
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/transmogrifier.ex15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex
index 9cd3de705..db848f657 100644
--- a/lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/lib/pleroma/web/activity_pub/transmogrifier.ex
@@ -202,21 +202,6 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|> Map.put("conversation", context)
end
- def fix_attachments(%{"attachment" => attachment} = object) when is_list(attachment) do
- attachments =
- Enum.map(attachment, fn data ->
- media_type = data["mediaType"] || data["mimeType"]
- href = data["url"] || data["href"]
- url = [%{"type" => "Link", "mediaType" => media_type, "href" => href}]
-
- data
- |> Map.put("mediaType", media_type)
- |> Map.put("url", url)
- end)
-
- Map.put(object, "attachment", attachments)
- end
-
def fix_attachments(%{"attachment" => attachment} = object) when is_map(attachment) do
object
|> Map.put("attachment", [attachment])