forked from AkkomaGang/akkoma
[Pleroma.Web.ActivityPub.Transmogrifier]: Fix when inReplyTo is a inlined post [kroeg]
This commit is contained in:
parent
523757be52
commit
a4abb124ea
1 changed files with 11 additions and 2 deletions
|
@ -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 <-
|
||||
|
|
Loading…
Reference in a new issue