From: lambda Date: Tue, 14 May 2019 15:27:34 +0000 (+0000) Subject: Merge branch 'refactor/use-job-queue-everywhere' into 'develop' X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=692919c7d260b85eb653089765d7f10425c06cf9;p=akkoma Merge branch 'refactor/use-job-queue-everywhere' into 'develop' use job queue everywhere Closes #862 See merge request pleroma/pleroma!1142 --- 692919c7d260b85eb653089765d7f10425c06cf9 diff --cc lib/pleroma/user.ex index 3eb684c3a,417d57d72..19f91d63c --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@@ -863,26 -824,8 +837,9 @@@ defmodule Pleroma.User d }, where: fragment("trim(? || ' ' || coalesce(?, '')) % ?", u.nickname, u.name, ^term) ) + |> restrict_deactivated() end - def blocks_import(%User{} = blocker, blocked_identifiers) when is_list(blocked_identifiers) do - Enum.map( - blocked_identifiers, - fn blocked_identifier -> - with {:ok, %User{} = blocked} <- get_or_fetch(blocked_identifier), - {:ok, blocker} <- block(blocker, blocked), - {:ok, _} <- ActivityPub.block(blocker, blocked) do - blocked - else - err -> - Logger.debug("blocks_import failed for #{blocked_identifier} with: #{inspect(err)}") - err - end - end - ) - end - def mute(muter, %User{ap_id: ap_id}) do info_cng = muter.info