Commit e9037ffc authored by eal's avatar eal

Do not include user in their own follower count.

parent 8d4e7b32
Pipeline #308 passed with stage
in 2 minutes and 50 seconds
......@@ -265,6 +265,7 @@ def update_note_count(%User{} = 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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment