forked from AkkomaGang/akkoma
If it's an object struct it is already normalized
This commit is contained in:
parent
54b82f236b
commit
c3a2052806
1 changed files with 1 additions and 0 deletions
|
@ -44,6 +44,7 @@ def get_by_ap_id(ap_id) do
|
||||||
def normalize(_, fetch_remote \\ true)
|
def normalize(_, fetch_remote \\ true)
|
||||||
# If we pass an Activity to Object.normalize(), we can try to use the preloaded object.
|
# 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!
|
# 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
|
def normalize(%Activity{object: %Object{} = object}, _), do: object
|
||||||
|
|
||||||
# A hack for fake activities
|
# A hack for fake activities
|
||||||
|
|
Loading…
Reference in a new issue