mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
user: break out local cases for maybe_direct_follow
This commit is contained in:
parent
ebc32045f0
commit
51eaece3ea
|
@ -184,7 +184,15 @@ defmodule Pleroma.User do
|
||||||
|
|
||||||
def needs_update?(_), do: true
|
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
|
if !User.ap_enabled?(followed) do
|
||||||
follow(follower, followed)
|
follow(follower, followed)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue