activity: minor cleanups to normalization functions to align them with the object normalizers
This commit is contained in:
parent
5ba5df1321
commit
5ea64f4bf9
@ -79,8 +79,8 @@ def get_create_activity_by_object_ap_id(ap_id) when is_binary(ap_id) 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
|
||||
|
Loading…
Reference in New Issue
Block a user