introduce User.maybe_direct_follow() and use it where we used to call User.follow()
This commit is contained in:
parent
c89b90222c
commit
e80d91c64a
3 changed files with 32 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||
|
||||
def follow(%User{} = follower, params) do
|
||||
with {:ok, %User{} = followed} <- get_user(params),
|
||||
{:ok, follower} <- User.maybe_direct_follow(follower, followed),
|
||||
{:ok, activity} <- ActivityPub.follow(follower, followed) do
|
||||
{:ok, follower, followed, activity}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue