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 !1336
parents 24bcc209 d53fb55b
Pipeline #13889 passed with stages
in 42 minutes and 51 seconds
......@@ -247,6 +247,7 @@ defmodule Pleroma.Web.CommonAPI do
res
else
{:private_to_public, true} -> {:error, "The message visibility must be direct"}
{:error, _} = e -> e
e -> {:error, e}
end
......
......@@ -121,7 +121,7 @@ defmodule Pleroma.Web.CommonAPITest do
})
Enum.each(["public", "private", "unlisted"], fn visibility ->
assert {:error, {:private_to_public, _}} =
assert {:error, "The message visibility must be direct"} =
CommonAPI.post(user, %{
"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