Skip to content
Snippets Groups Projects
Commit e05bf294 authored by kaniini's avatar kaniini
Browse files

activitypub: transmogrifier: correctly handle nil inReplyTo value

parent 94cbbb0e
Branches
No related tags found
No related merge requests found
......@@ -649,7 +649,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
if object = Object.normalize(id), do: {:ok, object}, else: nil
end
def set_reply_to_uri(%{"inReplyTo" => inReplyTo} = object) do
def set_reply_to_uri(%{"inReplyTo" => inReplyTo} = object) when is_binary(inReplyTo) do
with false <- String.starts_with?(inReplyTo, "http"),
{:ok, %{data: replied_to_object}} <- get_obj_helper(inReplyTo) do
Map.put(object, "inReplyTo", replied_to_object["external_url"] || inReplyTo)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment