User.Query: Speed up recipients query.
This commit is contained in:
parent
58ccd2bbfd
commit
a985bd57b4
3 changed files with 17 additions and 16 deletions
|
|
@ -1204,7 +1204,9 @@ defmodule Pleroma.User do
|
|||
def get_recipients_from_activity(%Activity{recipients: to, actor: actor}) do
|
||||
to = [actor | to]
|
||||
|
||||
User.Query.build(%{recipients_from_activity: to, local: true, deactivated: false})
|
||||
query = User.Query.build(%{recipients_from_activity: to, local: true, deactivated: false})
|
||||
|
||||
query
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue