X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Factivity_pub.ex;h=a4f1c7041969510c30a2a2cecefb9ac6f98132ff;hb=d923cb96b1c1270389b95138c3f7f13dae6286bb;hp=3a9b08cf05d39bfa74167ceb7c7c41e9ca843838;hpb=0022fa7d4968cb0681827d0773e1043b72338b72;p=akkoma diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 3a9b08cf0..a4f1c7041 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -105,6 +105,23 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do end end + @unpersisted_activity_types ~w[Undo Delete Remove Accept Reject] + @impl true + def persist(%{"type" => type} = object, [local: false] = meta) + when type in @unpersisted_activity_types do + {:ok, object, meta} + {recipients, _, _} = get_recipients(object) + + unpersisted = %Activity{ + data: object, + local: false, + recipients: recipients, + actor: object["actor"] + } + + {:ok, unpersisted, meta} + end + @impl true def persist(object, meta) do with local <- Keyword.fetch!(meta, :local), @@ -1674,7 +1691,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do {:error, e} {:error, {:reject, reason} = e} -> - Logger.info("Rejected user #{ap_id}: #{inspect(reason)}") + Logger.debug("Rejected user #{ap_id}: #{inspect(reason)}") {:error, e} {:error, e} ->