MastoAPI: fix & test giving MRF reject reasons

This commit is contained in:
Haelwenn (lanodan) Monnier 2020-07-15 15:25:33 +02:00
commit d29b8997f4
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
2 changed files with 18 additions and 0 deletions

View file

@ -172,6 +172,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
with_direct_conversation_id: true
)
else
{:error, {:reject, message}} ->
conn
|> put_status(:unprocessable_entity)
|> json(%{error: message})
{:error, message} ->
conn
|> put_status(:unprocessable_entity)