Merge branch 'fix/error-log-double-quotes' into 'develop'

Fix double quotes in error logs

See merge request pleroma/pleroma!1656
This commit is contained in:
Haelwenn 2019-09-12 20:21:56 +00:00
commit 51609217c2
2 changed files with 3 additions and 3 deletions

View File

@ -185,12 +185,12 @@ def fix_in_reply_to(%{"inReplyTo" => in_reply_to} = object, options)
|> Map.put("context", replied_object.data["context"] || object["conversation"]) |> Map.put("context", replied_object.data["context"] || object["conversation"])
else else
e -> e ->
Logger.error("Couldn't fetch \"#{inspect(in_reply_to_id)}\", error: #{inspect(e)}") Logger.error("Couldn't fetch #{inspect(in_reply_to_id)}, error: #{inspect(e)}")
object object
end end
e -> e ->
Logger.error("Couldn't fetch \"#{inspect(in_reply_to_id)}\", error: #{inspect(e)}") Logger.error("Couldn't fetch #{inspect(in_reply_to_id)}, error: #{inspect(e)}")
object object
end end
else else

View File

@ -102,7 +102,7 @@ test "it does not crash if the object in inReplyTo can't be fetched" do
assert capture_log(fn -> assert capture_log(fn ->
{:ok, _returned_activity} = Transmogrifier.handle_incoming(data) {:ok, _returned_activity} = Transmogrifier.handle_incoming(data)
end) =~ "[error] Couldn't fetch \"\"https://404.site/whatever\"\", error: nil" end) =~ "[error] Couldn't fetch \"https://404.site/whatever\", error: nil"
end end
test "it works for incoming notices" do test "it works for incoming notices" do