diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2020-07-15 15:25:33 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2020-07-15 15:25:33 +0200 |
commit | d29b8997f4a3601eac7f2e1e57de27a67df6699c (patch) | |
tree | 17443e5f71600e9178b8ea00a18ac5df18f7f776 /lib | |
parent | 858d9fc7e8e722604676c90cf2707f0209f935ec (diff) | |
download | pleroma-d29b8997f4a3601eac7f2e1e57de27a67df6699c.tar.gz |
MastoAPI: fix & test giving MRF reject reasons
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/status_controller.ex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex index 12be530c9..9bb2ef117 100644 --- a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex @@ -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) |