From: Egor Kislitsyn Date: Tue, 7 May 2019 09:51:11 +0000 (+0700) Subject: Merge remote-tracking branch 'pleroma/develop' into feature/disable-account X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=1557b99beb3b406572ef2d3baaabed1c9baeca1c;p=akkoma Merge remote-tracking branch 'pleroma/develop' into feature/disable-account --- 1557b99beb3b406572ef2d3baaabed1c9baeca1c diff --cc config/config.exs index 80f0c3f25,1e64b79a7..a89afd419 --- a/config/config.exs +++ b/config/config.exs @@@ -415,7 -417,7 +417,8 @@@ config :pleroma_job_queue, :queues mailer: 10, transmogrifier: 20, scheduled_activities: 10, - background: 5 ++ background: 5, + user: 10 config :pleroma, :fetch_initial_posts, enabled: false, diff --cc lib/pleroma/activity.ex index 9c1c804e0,73e63bb14..2dcb97159 --- a/lib/pleroma/activity.ex +++ b/lib/pleroma/activity.ex @@@ -265,13 -263,8 +267,18 @@@ defmodule Pleroma.Activity d |> Repo.all() end + @spec query_by_actor(actor()) :: Ecto.Query.t() + def query_by_actor(actor) do + from(a in Activity, where: a.actor == ^actor) + end ++ + def restrict_deactivated_users(query) do + from(activity in query, + where: + fragment( + "? not in (SELECT ap_id FROM users WHERE info->'deactivated' @> 'true')", + activity.actor + ) + ) + end end