Commit d53fb55b authored by Sergey Suprunenko's avatar Sergey Suprunenko Committed by Haelwenn

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

parent 24bcc209
......@@ -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