fix test
authorMaksim Pechnikov <parallel588@gmail.com>
Thu, 22 Aug 2019 18:32:40 +0000 (21:32 +0300)
committerMaksim Pechnikov <parallel588@gmail.com>
Thu, 22 Aug 2019 18:54:37 +0000 (21:54 +0300)
lib/pleroma/web/activity_pub/relay.ex
test/web/activity_pub/activity_pub_controller_test.exs

index 905e85cc6207e21d4a693b9c1243b7916d494817..ce3e30874ff29bf63a53548640de90b672baff7f 100644 (file)
@@ -36,8 +36,8 @@ defmodule Pleroma.Web.ActivityPub.Relay do
   def unfollow(target_instance) do
     with %User{} = local_user <- get_actor(),
          {:ok, %User{} = target_user} <- User.get_or_fetch_by_ap_id(target_instance),
-         {:ok, activity} <- ActivityPub.unfollow(local_user, target_user),
-         {:ok, _, _} <- User.unfollow(local_user, target_user) do
+         {:ok, activity} <- ActivityPub.unfollow(local_user, target_user) do
+      User.unfollow(local_user, target_user)
       Logger.info("relay: unfollowed instance: #{target_instance}: id=#{activity.data["id"]}")
       {:ok, activity}
     else
index cf71066fd8b2ffa8a0d4e55db41aa604d845a675..5192e734f7246be87efc138469ea9810c6bc1247 100644 (file)
@@ -10,9 +10,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
   alias Pleroma.Object
   alias Pleroma.User
   alias Pleroma.Web.ActivityPub.ObjectView
+  alias Pleroma.Web.ActivityPub.Relay
   alias Pleroma.Web.ActivityPub.UserView
   alias Pleroma.Web.ActivityPub.Utils
-  alias Pleroma.Web.ActivityPub.Relay
   alias Pleroma.Web.CommonAPI
 
   setup_all do