reject activity creation
if passed expires_at option and expiring activities are not configured
This commit is contained in:
parent
4981b5a1a3
commit
93e1c8df9d
3 changed files with 80 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue