diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-11 17:19:58 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-11 17:19:58 +0300 |
commit | 0bda85857e8f320ee7b91d8203fd621e1e2d5180 (patch) | |
tree | c77346be760cff6c3f50eceee778ef43a4bd252a /lib/pleroma/web/common_api/common_api.ex | |
parent | 4d18a50f3c4b6654339a6a8df71160e23b45cac0 (diff) | |
parent | 9fb88c814ddadd9138ef29550a856938491a1ca4 (diff) | |
download | pleroma-0bda85857e8f320ee7b91d8203fd621e1e2d5180.tar.gz |
Merge remote-tracking branch 'remotes/origin/develop' into media-preview-proxy
# Conflicts:
# lib/pleroma/instances/instance.ex
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 4ab533658..500c3883e 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -4,7 +4,6 @@ defmodule Pleroma.Web.CommonAPI do alias Pleroma.Activity - alias Pleroma.ActivityExpiration alias Pleroma.Conversation.Participation alias Pleroma.Formatter alias Pleroma.Object @@ -381,9 +380,9 @@ defmodule Pleroma.Web.CommonAPI do def check_expiry_date({:ok, nil} = res), do: res def check_expiry_date({:ok, in_seconds}) do - expiry = NaiveDateTime.utc_now() |> NaiveDateTime.add(in_seconds) + expiry = DateTime.add(DateTime.utc_now(), in_seconds) - if ActivityExpiration.expires_late_enough?(expiry) do + if Pleroma.Workers.PurgeExpiredActivity.expires_late_enough?(expiry) do {:ok, expiry} else {:error, "Expiry date is too soon"} |