Merge remote-tracking branch 'upstream/develop' into feature/move-activity

This commit is contained in:
Egor Kislitsyn 2019-11-14 16:39:45 +07:00
commit 3c0abfca53
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
118 changed files with 4497 additions and 1295 deletions

View file

@ -1102,7 +1102,12 @@ defmodule Pleroma.User do
def deactivate(%User{} = user, status) do
with {:ok, user} <- set_activation_status(user, status) do
Enum.each(get_followers(user), &invalidate_cache/1)
Enum.each(get_friends(user), &update_follower_count/1)
# Only update local user counts, remote will be update during the next pull.
user
|> get_friends()
|> Enum.filter(& &1.local)
|> Enum.each(&update_follower_count/1)
{:ok, user}
end