Skip to content
Snippets Groups Projects
Commit c3a20528 authored by rinpatch's avatar rinpatch :speech_balloon:
Browse files

If it's an object struct it is already normalized

parent 54b82f23
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@ def get_by_ap_id(ap_id) 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment