Merge branch 'refactor/use-job-queue-everywhere' into 'develop'
authorlambda <lain@soykaf.club>
Tue, 14 May 2019 15:27:34 +0000 (15:27 +0000)
committerlambda <lain@soykaf.club>
Tue, 14 May 2019 15:27:34 +0000 (15:27 +0000)
use job queue everywhere

Closes #862

See merge request pleroma/pleroma!1142

1  2 
lib/pleroma/user.ex
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/twitter_api/controllers/util_controller.ex

index 3eb684c3ac9593ff67476000ceca12515f4a67d1,417d57d727c5b8025bd9afa12f6b9c87c56bfe00..19f91d63cf7a330c3ffe5363f7ca5459c9c9daba
@@@ -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