activitypub: use Activity.normalize() in several places instead of using Activity...
[akkoma] / lib / pleroma / web / activity_pub / activity_pub.ex
index 93219d76ab6e0cce29f93cefd2c25ebfcc658a15..464832a1ef28264e6e0d0ad9230a068595b83611 100644 (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),