From: Ivan Tashkinov Date: Wed, 5 Dec 2018 17:23:28 +0000 (+0300) Subject: [#210] Stylistic change. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c4f3c5e939638905f94cdee53db7a0704a80d133;p=akkoma [#210] Stylistic change. --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 39692163f..4eb9d96ab 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -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 = if opts[:actor], do: Map.put(data, "actor", opts[:actor]), else: data + obj_data = (opts[:actor] && Map.put(data, "actor", opts[:actor])) || data Repo.insert(%Object{data: obj_data}) end end