diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-06-14 22:36:52 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-06-14 22:36:52 +0300 |
commit | e1dc36afe0fc2ab96e23c1b0c2fa78465d2f9e0f (patch) | |
tree | 8c29db2e9bb128f9316c62892a533be114e238b4 /lib/pleroma/web/common_api/common_api.ex | |
parent | 0ab69da1f25d93b0f2e1827ad044b2f1bf6a1cf2 (diff) | |
parent | 271ea5068f4e3b901cb3f682e132378246daf452 (diff) | |
download | pleroma-e1dc36afe0fc2ab96e23c1b0c2fa78465d2f9e0f.tar.gz |
Merge branch 'develop' into refactor/fe-bundles
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 5a194910d..04e081a8e 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -423,20 +423,10 @@ defmodule Pleroma.Web.CommonAPI do def post(user, %{status: _} = data) do with {:ok, draft} <- Pleroma.Web.CommonAPI.ActivityDraft.create(user, data) do - draft.changes - |> ActivityPub.create(draft.preview?) - |> maybe_create_activity_expiration(draft.expires_at) + ActivityPub.create(draft.changes, draft.preview?) end end - defp maybe_create_activity_expiration({:ok, activity}, %NaiveDateTime{} = expires_at) do - with {:ok, _} <- ActivityExpiration.create(activity, expires_at) do - {:ok, activity} - end - end - - defp maybe_create_activity_expiration(result, _), do: result - def pin(id, %{ap_id: user_ap_id} = user) do with %Activity{ actor: ^user_ap_id, |