Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop

This commit is contained in:
sadposter 2019-08-11 21:03:20 +01:00
commit 460a59b665

View file

@ -333,13 +333,15 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
def fix_type(object, options \\ []) def fix_type(object, options \\ [])
def fix_type(%{"inReplyTo" => reply_id} = object, options) when is_binary(reply_id) do def fix_type(%{"inReplyTo" => reply_id, "name" => _} = object, options)
when is_binary(reply_id) do
reply = reply =
if Federator.allowed_incoming_reply_depth?(options[:depth]) do with true <- Federator.allowed_incoming_reply_depth?(options[:depth]),
Object.normalize(reply_id, true) {:ok, object} <- get_obj_helper(reply_id, options) do
object
end end
if reply && (reply.data["type"] == "Question" and object["name"]) do if reply && reply.data["type"] == "Question" do
Map.put(object, "type", "Answer") Map.put(object, "type", "Answer")
else else
object object