[#210] Stylistic change.
authorIvan Tashkinov <ivantashkinov@gmail.com>
Wed, 5 Dec 2018 18:48:21 +0000 (21:48 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Wed, 5 Dec 2018 18:48:21 +0000 (21:48 +0300)
lib/pleroma/web/activity_pub/activity_pub.ex

index 4eb9d96abbae32c72f97e33557e417875c1c4a58..39692163f168363bab1ec6f3c7263e0de8ff53a5 100644 (file)
@@ -574,7 +574,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
 
   def upload(file, opts \\ []) do
     with {:ok, data} <- Upload.store(file, opts) do
-      obj_data = (opts[:actor] && Map.put(data, "actor", opts[:actor])) || data
+      obj_data = if opts[:actor], do: Map.put(data, "actor", opts[:actor]), else: data
       Repo.insert(%Object{data: obj_data})
     end
   end