From c3a20528060e4fb95292dd93768d9afc8926e66e Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 17 Apr 2019 15:11:22 +0300 Subject: [PATCH] If it's an object struct it is already normalized --- lib/pleroma/object.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index 3f1d0fea1..740d687a3 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -44,6 +44,7 @@ defmodule Pleroma.Object do def normalize(_, fetch_remote \\ true) # If we pass an Activity to Object.normalize(), we can try to use the preloaded object. # Use this whenever possible, especially when walking graphs in an O(N) loop! + def normalize(%Object{} = object, _), do: object def normalize(%Activity{object: %Object{} = object}, _), do: object # A hack for fake activities -- 2.45.2