diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-13 15:45:35 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-17 14:15:33 +0300 |
commit | a0977a1f1e450653bdc48630e9aada550dea1793 (patch) | |
tree | 65b6b1a9b5e3b37d7f32234d29156df3210a46f0 /lib/pleroma/user.ex | |
parent | 5178c8dbc34db3b78eaa21a2f46300ac1a639c8c (diff) | |
download | pleroma-fix/1518-admin-reports-timeout.tar.gz |
optimization for group reportsfix/1518-admin-reports-timeout
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 5ea36fea3..2bca398b7 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -713,6 +713,11 @@ defmodule Pleroma.User do |> Repo.all() end + def get_all_by_ap_ids(ap_ids) do + from(u in __MODULE__, where: u.ap_id in ^ap_ids) + |> Repo.all() + end + # This is mostly an SPC migration fix. This guesses the user nickname by taking the last part # of the ap_id and the domain and tries to get that user def get_by_guessed_nickname(ap_id) do |