commit: 5c193a34a2113e7ab272996b4179c69487686245
parent b6a1e7fb3140a2941088b21c60fe8a8569827e55
Author: Mark Felder <feld@feld.me>
Date: Sat, 27 Jan 2024 15:05:12 -0500
Pleroma.Web.ActivityPub.SideEffects: dialyzer errors
lib/pleroma/web/activity_pub/side_effects.ex:544:call
The function call will not succeed.
Pleroma.Web.ActivityPub.SideEffects.delete_object(
_object :: %Pleroma.Activity{
:__meta__ => _,
:actor => _,
:bookmark => _,
:data => map(),
:id => _,
:inserted_at => _,
:local => _,
:notifications => _,
:object => _,
:pagination_id => _,
:recipients => _,
:report_notes => _,
:thread_muted? => _,
:updated_at => _,
:user_actor => _
}
)
breaks the contract
(Pleroma.Object.t()) :: :ok | {:error, Ecto.Changeset.t()}
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pleroma/web/activity_pub/side_effects.ex b/lib/pleroma/web/activity_pub/side_effects.ex
@@ -580,7 +580,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
def handle_undoing(object), do: {:error, ["don't know how to handle", object]}
- @spec delete_object(Object.t()) :: :ok | {:error, Ecto.Changeset.t()}
+ @spec delete_object(Activity.t()) :: :ok | {:error, Ecto.Changeset.t()}
defp delete_object(object) do
with {:ok, _} <- Repo.delete(object), do: :ok
end