Add tests for counters being updated on follow
This commit is contained in:
parent
f42719506c
commit
301ea0dc04
6 changed files with 93 additions and 21 deletions
|
|
@ -741,7 +741,7 @@ defmodule Pleroma.User do
|
|||
end
|
||||
|
||||
def update_follower_count(%User{} = user) do
|
||||
unless !user.local and Pleroma.Config.get([:instance, :external_user_synchronization]) do
|
||||
if user.local or !Pleroma.Config.get([:instance, :external_user_synchronization]) do
|
||||
follower_count_query =
|
||||
User.Query.build(%{followers: user, deactivated: false})
|
||||
|> select([u], %{count: count(u.id)})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue