commit: 7eb579c1911f2eac175c2030f6bb80685b4ab4f8
parent bc16f09d7b9c1a15c8c9be6d99092b9a8d867d18
Author: Mark Felder <feld@feld.me>
Date: Fri, 6 Sep 2024 11:18:12 -0400
Dialyzer: invalid contract
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/pleroma/user/import.ex b/lib/pleroma/user/import.ex
@@ -12,7 +12,7 @@ defmodule Pleroma.User.Import do
require Logger
- @spec perform(atom(), User.t(), list()) :: :ok | list() | {:error, any()}
+ @spec perform(atom(), User.t(), String.t()) :: :ok | {:error, any()}
def perform(:mute_import, %User{} = user, actor) do
with {:ok, %User{} = muted_user} <- User.get_or_fetch(actor),
{_, false} <- {:existing_mute, User.mutes_user?(user, muted_user)},
@@ -49,7 +49,7 @@ defmodule Pleroma.User.Import do
defp handle_error(op, user_id, error) do
Logger.debug("#{op} failed for #{user_id} with: #{inspect(error)}")
- error
+ {:error, error}
end
def blocks_import(%User{} = user, [_ | _] = actors) do