activitypub: use Activity.normalize() in several places instead of using Activity.get_by_ap_id() directly.

This commit is contained in:
William Pitcock 2018-06-18 21:21:03 +00:00
commit 7c63e70de1
2 changed files with 3 additions and 17 deletions

View file

@ -30,7 +30,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
def insert(map, local \\ true) when is_map(map) do
with nil <- Activity.get_by_ap_id(map["id"]),
with nil <- Activity.normalize(map),
map <- lazy_put_activity_defaults(map),
:ok <- check_actor_is_active(map["actor"]),
{:ok, map} <- MRF.filter(map),