Add expiring blocks
- `/api/v1/accounts/:id/block` now has a "duration" parameter - `/api/v1/blocks` returns "block_expires_at" to indicate when the block will expire - MuteExpireWorker also processes block expiration - Remove unused OpenAPI parameters from mute endpoint - Add pleroma:block_expiration to nodeinfo features
This commit is contained in:
parent
1775a4db08
commit
51a0cee405
12 changed files with 112 additions and 33 deletions
|
|
@ -27,9 +27,9 @@ defmodule Pleroma.Web.CommonAPI do
|
|||
require Logger
|
||||
|
||||
@spec block(User.t(), User.t()) :: {:ok, Activity.t()} | Pipeline.errors()
|
||||
def block(blocked, blocker) do
|
||||
with {:ok, block_data, _} <- Builder.block(blocker, blocked),
|
||||
{:ok, block, _} <- Pipeline.common_pipeline(block_data, local: true) do
|
||||
def block(blocked, blocker, params \\ %{}) do
|
||||
with {:ok, block_data, meta} <- Builder.block(blocker, blocked, params),
|
||||
{:ok, block, _} <- Pipeline.common_pipeline(block_data, meta ++ [local: true]) do
|
||||
{:ok, block}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue