mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-01-02 21:38:41 +00:00
Dialyzer: invalid contract
This commit is contained in:
parent
bc16f09d7b
commit
7eb579c191
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ defmodule Pleroma.User.Import do
|
||||||
|
|
||||||
require Logger
|
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
|
def perform(:mute_import, %User{} = user, actor) do
|
||||||
with {:ok, %User{} = muted_user} <- User.get_or_fetch(actor),
|
with {:ok, %User{} = muted_user} <- User.get_or_fetch(actor),
|
||||||
{_, false} <- {:existing_mute, User.mutes_user?(user, muted_user)},
|
{_, 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
|
defp handle_error(op, user_id, error) do
|
||||||
Logger.debug("#{op} failed for #{user_id} with: #{inspect(error)}")
|
Logger.debug("#{op} failed for #{user_id} with: #{inspect(error)}")
|
||||||
error
|
{:error, error}
|
||||||
end
|
end
|
||||||
|
|
||||||
def blocks_import(%User{} = user, [_ | _] = actors) do
|
def blocks_import(%User{} = user, [_ | _] = actors) do
|
||||||
|
|
Loading…
Reference in a new issue