X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Ffollowing_relationship.ex;h=a6d28115137b32cb5ec30026f87461c20971930b;hb=fc2eb1fbd6a5b38a3cf72e557cce1029d6b7f16f;hp=cc381af53f1e47986d70bdfbe0b272044829edb4;hpb=8b9742ecf546c37695229d54f0a0b3ed4edd66e1;p=akkoma
diff --git a/lib/pleroma/following_relationship.ex b/lib/pleroma/following_relationship.ex
index cc381af53..a6d281151 100644
--- a/lib/pleroma/following_relationship.ex
+++ b/lib/pleroma/following_relationship.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.FollowingRelationship do
@@ -30,24 +30,9 @@ defmodule Pleroma.FollowingRelationship do
end
def get(%User{} = follower, %User{} = following) do
- following_relationship =
- __MODULE__
- |> where(follower_id: ^follower.id, following_id: ^following.id)
- |> Repo.one()
-
- case {following_relationship, following.local} do
- {nil, false} ->
- case Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(follower, following) do
- %{data: %{"state" => state}} when state in ["pending", "accept"] ->
- %{state: state}
-
- _ ->
- nil
- end
-
- {following_relationship, _} ->
- following_relationship
- end
+ __MODULE__
+ |> where(follower_id: ^follower.id, following_id: ^following.id)
+ |> Repo.one()
end
def update(follower, following, "reject"), do: unfollow(follower, following)