Merge branch 'following-relationships-optimizations' into 'develop'

FollowingRelationship storage & performance optimizations

See merge request pleroma/pleroma!2332
This commit is contained in:
rinpatch 2020-04-11 19:46:04 +00:00
commit 5e365448f3
17 changed files with 157 additions and 57 deletions

View file

@ -21,7 +21,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do
other_user = insert(:user)
{:ok, _activity} = ActivityPub.follow(other_user, user)
{:ok, other_user} = User.follow(other_user, user, "pending")
{:ok, other_user} = User.follow(other_user, user, :follow_pending)
assert User.following?(other_user, user) == false
@ -35,7 +35,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do
other_user = insert(:user)
{:ok, _activity} = ActivityPub.follow(other_user, user)
{:ok, other_user} = User.follow(other_user, user, "pending")
{:ok, other_user} = User.follow(other_user, user, :follow_pending)
user = User.get_cached_by_id(user.id)
other_user = User.get_cached_by_id(other_user.id)