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 @@ def make_note_data(
} }
if inReplyTo do if inReplyTo do
inReplyToObject = Object.normalize(inReplyTo.data["object"])
object object
|> Map.put("inReplyTo", inReplyTo.data["object"]["id"]) |> Map.put("inReplyTo", inReplyToObject.data["id"])
|> Map.put("inReplyToStatusId", inReplyTo.id) |> Map.put("inReplyToStatusId", inReplyTo.id)
else else
object object