diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-08-16 15:58:42 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-08-16 15:58:42 +0300 |
commit | 3315a2a1c3cae3375bbb1c7112b2c75563f3a4af (patch) | |
tree | 43014c2961a5c6ff204a6d0587afdf31555a9d29 /lib | |
parent | 0f24edcd8dc2e6c74d384d3fc31acfa7d2d56702 (diff) | |
download | pleroma-3315a2a1c3cae3375bbb1c7112b2c75563f3a4af.tar.gz pleroma-3315a2a1c3cae3375bbb1c7112b2c75563f3a4af.zip |
fixed User.unfollow with synchronization external user
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/user.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index a1040fe71..23748ef26 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -742,6 +742,7 @@ defmodule Pleroma.User do |> update_and_set_cache() end + @spec maybe_fetch_follow_information(User.t()) :: User.t() def maybe_fetch_follow_information(user) do with {:ok, user} <- fetch_follow_information(user) do user @@ -799,9 +800,10 @@ defmodule Pleroma.User do end end + @spec maybe_update_following_count(User.t()) :: User.t() def maybe_update_following_count(%User{local: false} = user) do if Pleroma.Config.get([:instance, :external_user_synchronization]) do - {:ok, maybe_fetch_follow_information(user)} + maybe_fetch_follow_information(user) else user end |