Unfollow should also unsubscribe

This commit is contained in:
Sergey Suprunenko 2019-07-14 19:25:03 +00:00 committed by kaniini
commit dce8ebc9ea
3 changed files with 17 additions and 1 deletions

View file

@ -31,7 +31,8 @@ defmodule Pleroma.Web.CommonAPI do
def unfollow(follower, unfollowed) do
with {:ok, follower, _follow_activity} <- User.unfollow(follower, unfollowed),
{:ok, _activity} <- ActivityPub.unfollow(follower, unfollowed) do
{:ok, _activity} <- ActivityPub.unfollow(follower, unfollowed),
{:ok, _unfollowed} <- User.unsubscribe(follower, unfollowed) do
{:ok, follower}
end
end