From: Roger Braun Date: Thu, 18 May 2017 14:58:30 +0000 (+0200) Subject: Wire up inReplyToStatusIds for ostatus. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=042cdf09ca49d9d4a8f1e5025ca2fd7edceeeb8d;p=akkoma Wire up inReplyToStatusIds for ostatus. --- diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex index e913e389f..a709dac4e 100644 --- a/lib/pleroma/web/ostatus/ostatus.ex +++ b/lib/pleroma/web/ostatus/ostatus.ex @@ -196,7 +196,15 @@ defmodule Pleroma.Web.OStatus do } object = if inReplyTo do - Map.put(object, "inReplyTo", inReplyTo) + replied_to_object = Object.get_cached_by_ap_id(inReplyTo) + if replied_to_object do + object + |> Map.put("inReplyTo", inReplyTo) + |> Map.put("inReplyToStatusId", replied_to_object.id) + else + object + |> Map.put("inReplyTo", inReplyTo) + end else object end