common api: utils: access inReplyTo object ID correctly

This commit is contained in:
William Pitcock 2018-11-25 19:00:05 +00:00
parent d6b266163b
commit 67038ae15e

View file

@ -177,8 +177,10 @@ defmodule Pleroma.Web.CommonAPI.Utils do
}
if inReplyTo do
inReplyToObject = Object.normalize(inReplyTo.data["object"])
object
|> Map.put("inReplyTo", inReplyTo.data["object"]["id"])
|> Map.put("inReplyTo", inReplyToObject.data["id"])
|> Map.put("inReplyToStatusId", inReplyTo.id)
else
object