From 6a6aaa0e1aade45bc2e3b68ee2c4686cc80f46cd Mon Sep 17 00:00:00 2001 From: scarlett Date: Thu, 6 Dec 2018 11:37:29 +0000 Subject: [PATCH] Use object.normalize. --- lib/pleroma/web/activity_pub/mrf/ensure_re_prepended.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/web/activity_pub/mrf/ensure_re_prepended.ex b/lib/pleroma/web/activity_pub/mrf/ensure_re_prepended.ex index 3f216010e..06fafb3ee 100644 --- a/lib/pleroma/web/activity_pub/mrf/ensure_re_prepended.ex +++ b/lib/pleroma/web/activity_pub/mrf/ensure_re_prepended.ex @@ -1,5 +1,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.EnsureRePrepended do - alias Pleroma.Activity + alias Pleroma.Object @behaviour Pleroma.Web.ActivityPub.MRF @@ -20,11 +20,11 @@ def filter_by_summary(parent, child), do: child def filter(%{"type" => activity_type} = object) when activity_type == "Create" do child = object["object"] - in_reply_to = Activity.get_create_activity_by_object_ap_id(child["inReplyTo"]) + in_reply_to = Object.normalize(child["inReplyTo"]) child = if(in_reply_to, - do: filter_by_summary(in_reply_to.data["object"], child), + do: filter_by_summary(in_reply_to.data, child), else: child )