mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-19 11:45:01 +00:00
Do not include user in their own follower count.
This commit is contained in:
parent
8d4e7b32c9
commit
e9037ffc8d
1 changed files with 1 additions and 0 deletions
|
@ -265,6 +265,7 @@ defmodule Pleroma.User do
|
|||
def update_follower_count(%User{} = user) do
|
||||
follower_count_query = from u in User,
|
||||
where: fragment("? @> ?", u.following, ^user.follower_address),
|
||||
where: u.id != ^user.id,
|
||||
select: count(u.id)
|
||||
|
||||
follower_count = Repo.one(follower_count_query)
|
||||
|
|
Loading…
Reference in a new issue