diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
commit | c5830ac037c0c344bd22b674c41f4dc244a088aa (patch) | |
tree | d5a02f43337536d05b934bee3012dab319ccc127 /lib/pleroma/web/common_api/common_api.ex | |
parent | 527afb813af6c64337d02ddf1a2f159fe557acbc (diff) | |
parent | 88fe0a262e21ba1284e72eddb1d41363dc029aa7 (diff) | |
download | pleroma-c5830ac037c0c344bd22b674c41f4dc244a088aa.tar.gz |
Merge develop
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 b217c4d10..b49a95791 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"} |