Unify unfollow, accept and reject follow requests using CommonAPI
This commit is contained in:
parent
92a0210fb0
commit
e416c344dd
4 changed files with 42 additions and 46 deletions
|
|
@ -35,11 +35,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||
|
||||
def unfollow(%User{} = follower, params) do
|
||||
with {:ok, %User{} = unfollowed} <- get_user(params),
|
||||
{:ok, follower, _follow_activity} <- User.unfollow(follower, unfollowed),
|
||||
{:ok, _activity} <- ActivityPub.unfollow(follower, unfollowed) do
|
||||
{:ok, follower} <- CommonAPI.unfollow(follower, unfollowed) do
|
||||
{:ok, follower, unfollowed}
|
||||
else
|
||||
err -> err
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue