Move configuration to traditional way

️ This is the way.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-01-30 20:27:25 +01:00
parent 98051b08c3
commit 9e3df495dc
32 changed files with 368 additions and 256 deletions

View File

@@ -54,8 +54,8 @@ defmodule Mobilizon.GraphQL.API.Follows do
def reject(%Actor{} = follower, %Actor{} = followed) do
Logger.debug("We're trying to reject a follow")
with %Follower{} = follow <-
Actors.is_following(follower, followed),
with {:follower, %Follower{} = follow} <-
{:follower, Actors.is_following(follower, followed)},
{:ok, %Activity{} = activity, %Follower{} = follow} <-
ActivityPub.reject(
:follow,
@@ -64,7 +64,10 @@ defmodule Mobilizon.GraphQL.API.Follows do
) do
{:ok, activity, follow}
else
%Follower{approved: true} ->
{:follower, nil} ->
{:error, "Follow not found"}
{:follower, %Follower{approved: true}} ->
{:error, "Follow already accepted"}
end
end