diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-09-03 13:30:39 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-09-10 21:50:41 +0300 |
commit | 93e1c8df9dca697e7bdb822a8a5b3848b7870f53 (patch) | |
tree | 409586fc4ec6173ae2cf148782b5006f85782746 /lib/pleroma/workers | |
parent | 4981b5a1a3c097ca849552c3c6f650efd22c7451 (diff) | |
download | pleroma-93e1c8df9dca697e7bdb822a8a5b3848b7870f53.tar.gz |
reject activity creation
if passed expires_at option and expiring activities are not configured
Diffstat (limited to 'lib/pleroma/workers')
-rw-r--r-- | lib/pleroma/workers/purge_expired_activity.ex | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/workers/purge_expired_activity.ex b/lib/pleroma/workers/purge_expired_activity.ex index 42e2ae79c..c70587b47 100644 --- a/lib/pleroma/workers/purge_expired_activity.ex +++ b/lib/pleroma/workers/purge_expired_activity.ex @@ -13,6 +13,10 @@ defmodule Pleroma.Workers.PurgeExpiredActivity do alias Pleroma.Activity + @spec enqueue(map()) :: + {:ok, Oban.Job.t()} + | {:error, :expired_activities_disabled} + | {:error, :expiration_too_close} def enqueue(args) do with true <- enabled?(), args when is_map(args) <- validate_expires_at(args) do |