From: Ivan Tashkinov Date: Wed, 5 Dec 2018 18:48:21 +0000 (+0300) Subject: [#210] Stylistic change. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=3b5be09f4544ab1b3f6821fd4bbe047f94ef71ac;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 4eb9d96ab..39692163f 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 = (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