projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d4e7b3
)
Do not include user in their own follower count.
author
eal
<eal@waifu.club>
Tue, 21 Nov 2017 13:33:09 +0000
(15:33 +0200)
committer
eal
<eal@waifu.club>
Tue, 21 Nov 2017 13:33:09 +0000
(15:33 +0200)
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index f80c0ae338f54f3ed4714f6d877bcb2846a7edfa..68ffe184b7b36fa031ecdbca12259fd88ec5609e 100644
(file)
--- 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)