Apply suggestion to lib/pleroma/web/activity_pub/object_validator.ex
authorlain <lain@soykaf.club>
Thu, 26 Mar 2020 14:23:19 +0000 (14:23 +0000)
committerlain <lain@soykaf.club>
Thu, 26 Mar 2020 14:23:19 +0000 (14:23 +0000)
lib/pleroma/web/activity_pub/object_validator.ex

index cff92404721846f2b8b90c8b03d46364f5211bb0..9b2889e927bc14f39a5bbdc9a8df844930027fdb 100644 (file)
@@ -26,8 +26,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do
 
   def stringify_keys(object) do
     object
-    |> Enum.map(fn {key, val} -> {to_string(key), val} end)
-    |> Enum.into(%{})
+    |> Map.new(fn {key, val} -> {to_string(key), val} end)
   end
 
   def fetch_actor_and_object(object) do