Verified Commit a4abb124 authored by Haelwenn's avatar Haelwenn
Browse files

[Pleroma.Web.ActivityPub.Transmogrifier]: Fix when inReplyTo is a inlined post [kroeg]

parent 523757be
......@@ -96,8 +96,17 @@ def fix_likes(object) do
object
end
def fix_in_reply_to(%{"inReplyTo" => in_reply_to_id} = object)
when not is_nil(in_reply_to_id) do
def fix_in_reply_to(%{"inReplyTo" => in_reply_to} = object)
when not is_nil(in_reply_to) do
in_reply_to_id =
if is_bitstring(in_reply_to) do
in_reply_to
else
if is_map(in_reply_to) && in_reply_to["id"] do
in_reply_to["id"]
end
end
case ActivityPub.fetch_object_from_id(in_reply_to_id) do
{:ok, replied_object} ->
with %Activity{} = activity <-
......
Supports Markdown
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