Speed up follower query.
This commit is contained in:
parent
1d1271ca1e
commit
bd4926288e
2 changed files with 2 additions and 1 deletions
|
|
@ -265,7 +265,7 @@ defmodule Pleroma.User do
|
|||
|
||||
def get_followers(%User{id: id, follower_address: follower_address}) do
|
||||
q = from u in User,
|
||||
where: ^follower_address in u.following,
|
||||
where: fragment("? <@ ?", ^[follower_address], u.following),
|
||||
where: u.id != ^id
|
||||
|
||||
{:ok, Repo.all(q)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue