From: eal Date: Tue, 21 Nov 2017 13:33:09 +0000 (+0200) Subject: Do not include user in their own follower count. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e9037ffc8d38d905c746a30128ab8ca930acbcd1;p=akkoma Do not include user in their own follower count. --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index f80c0ae33..68ffe184b 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -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)