From 042cdf09ca49d9d4a8f1e5025ca2fd7edceeeb8d Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Thu, 18 May 2017 16:58:30 +0200 Subject: [PATCH] Wire up inReplyToStatusIds for ostatus. --- lib/pleroma/web/ostatus/ostatus.ex | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 @@ def handle_note(entry, doc \\ nil) 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