[#1335] Reorganized users.subscribers as UserRelationship. Added tests for UserRelationship-related functionality.

This commit is contained in:
Ivan Tashkinov 2019-11-20 15:46:11 +03:00
commit de892d2fe1
11 changed files with 263 additions and 62 deletions

View file

@ -33,7 +33,7 @@ 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),
{:ok, _unfollowed} <- User.unsubscribe(follower, unfollowed) do
{:ok, _subscription} <- User.unsubscribe(follower, unfollowed) do
{:ok, follower}
end
end