transmogrifier: reformat `cond` block by hand
authorWilliam Pitcock <nenolod@dereferenced.org>
Wed, 26 Sep 2018 18:47:18 +0000 (18:47 +0000)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 27 Sep 2018 18:00:47 +0000 (20:00 +0200)
lib/pleroma/web/activity_pub/transmogrifier.ex

index 704c76f7028c36cd82c960e3d1b2b12a80c1887e..868e773c4f5bcfa837c5cc25937c6b7c38cb0e3e 100644 (file)
@@ -100,11 +100,18 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
       when not is_nil(in_reply_to) do
     in_reply_to_id =
       cond do
-        is_bitstring(in_reply_to) -> in_reply_to
-        is_map(in_reply_to) && is_bitstring(in_reply_to["id"]) -> in_reply_to["id"]
-        is_list(in_reply_to) && is_bitstring(Enum.at(in_reply_to, 0)) -> Enum.at(in_reply_to, 0)
+        is_bitstring(in_reply_to) ->
+          in_reply_to
+
+        is_map(in_reply_to) && is_bitstring(in_reply_to["id"]) ->
+          in_reply_to["id"]
+
+        is_list(in_reply_to) && is_bitstring(Enum.at(in_reply_to, 0)) ->
+          Enum.at(in_reply_to, 0)
+
         # Maybe I should output an error too?
-        true -> ""
+        true ->
+          ""
       end
 
     case ActivityPub.fetch_object_from_id(in_reply_to_id) do