Commit 145bcf3e authored by Haelwenn's avatar Haelwenn

Merge branch 'fix/handle-wrong-visibility-error' into 'develop'

Return correct response when reply to a direct message is not direct itself

Closes #1010

See merge request pleroma/pleroma!1336
parents 24bcc209 d53fb55b
Pipeline #13889 passed with stages
in 42 minutes and 51 seconds
......@@ -247,6 +247,7 @@ def post(user, %{"status" => status} = data) do
{:private_to_public, true} -> {:error, "The message visibility must be direct"}
{:error, _} = e -> e
e -> {:error, e}
......@@ -121,7 +121,7 @@ test "it does not allow replies to direct messages that are not direct messages
Enum.each(["public", "private", "unlisted"], fn visibility ->
assert {:error, {:private_to_public, _}} =
assert {:error, "The message visibility must be direct"} =, %{
"status" => "suya..",
"visibility" => visibility,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment