From 5ea64f4bf958d9801d89d1165fa20d0e17bf0570 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 25 Nov 2018 21:34:36 +0000 Subject: [PATCH] activity: minor cleanups to normalization functions to align them with the object normalizers --- lib/pleroma/activity.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/activity.ex b/lib/pleroma/activity.ex index 3c7e150ee..34d0a34b8 100644 --- a/lib/pleroma/activity.ex +++ b/lib/pleroma/activity.ex @@ -79,8 +79,8 @@ defmodule Pleroma.Activity do def get_create_activity_by_object_ap_id(_), do: nil - def normalize(obj) when is_map(obj), do: Activity.get_by_ap_id(obj["id"]) - def normalize(ap_id) when is_binary(ap_id), do: Activity.get_by_ap_id(ap_id) + def normalize(obj) when is_map(obj), do: normalize(obj["id"]) + def normalize(ap_id) when is_binary(ap_id), do: get_by_ap_id(ap_id) def normalize(_), do: nil defp get_in_reply_to_activity_from_object(%Object{data: %{"inReplyTo" => ap_id}}) do -- 2.45.2