summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-09-26 21:01:33 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-09-27 20:00:47 +0200
commit4c3a80de96e92f27cc27213e7314a062e2d61845 (patch)
tree43d118a086e9c0d78ccce595b779f626d7b8b2d8
parented8dfa3029da8e6b20fca66d51c96c87e5eedbd9 (diff)
downloadpleroma-4c3a80de96e92f27cc27213e7314a062e2d61845.tar.gz
pleroma-4c3a80de96e92f27cc27213e7314a062e2d61845.zip
transmogrifier: Use oneliners when applicable
-rw-r--r--lib/pleroma/web/activity_pub/transmogrifier.ex12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex
index 868e773c4..29d7b642b 100644
--- a/lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/lib/pleroma/web/activity_pub/transmogrifier.ex
@@ -167,9 +167,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
Map.put(object, "attachment", attachment)
end
- def fix_attachments(object) do
- object
- end
+ def fix_attachments(object), do: object
def fix_emoji(%{"tag" => tags} = object) when is_list(tags) do
emoji = tags |> Enum.filter(fn data -> data["type"] == "Emoji" and data["icon"] end)
@@ -197,9 +195,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|> Map.put("emoji", emoji)
end
- def fix_emoji(object) do
- object
- end
+ def fix_emoji(object), do: object
def fix_tag(%{"tag" => tag} = object) when is_list(tag) do
tags =
@@ -220,9 +216,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|> Map.put("tag", combined)
end
- def fix_tag(object) do
- object
- end
+ def fix_tag(object), do: object
# content map usually only has one language so this will do for now.
def fix_content_map(%{"contentMap" => content_map} = object) do