Merge branch 'fix/self-follow' into 'develop'
Dont include the user in their own follower count. See merge request pleroma/pleroma!29
This commit is contained in:
commit
1625021a9c
2 changed files with 2 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…
Add table
Add a link
Reference in a new issue