Commit 51eaece3 authored by kaniini's avatar kaniini

user: break out local cases for maybe_direct_follow

parent ebc32045
Pipeline #3964 passed with stages
in 5 minutes and 50 seconds
......@@ -184,7 +184,15 @@ def needs_update?(%User{local: false} = user) do
def needs_update?(_), do: true
def maybe_direct_follow(%User{} = follower, %User{info: info} = followed) do
def maybe_direct_follow(%User{} = follower, %User{local: true, info: %{"locked" => true}}) do
{:ok, follower}
end
def maybe_direct_follow(%User{} = follower, %User{local: true} = followed) do
follow(follower, followed)
end
def maybe_direct_follow(%User{} = follower, %User{} = followed) do
if !User.ap_enabled?(followed) do
follow(follower, followed)
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment