Don't auto-approve instance follows
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
8e6aa8c85c
commit
076c14b54e
|
@ -3,7 +3,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
|||
alias Mobilizon.Actors
|
||||
alias Mobilizon.Actors.{Actor, Follower, Member}
|
||||
alias Mobilizon.Federation.ActivityPub
|
||||
alias Mobilizon.Federation.ActivityPub.Audience
|
||||
alias Mobilizon.Federation.ActivityPub.{Audience, Relay}
|
||||
alias Mobilizon.Federation.ActivityPub.Types.Entity
|
||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||
alias Mobilizon.GraphQL.API.Utils, as: APIUtils
|
||||
|
@ -223,7 +223,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
|||
%Follower{} = follower,
|
||||
follow_as_data
|
||||
) do
|
||||
unless follower.target_actor.manually_approves_followers do
|
||||
%Actor{id: relay_id} = Relay.get_actor()
|
||||
|
||||
unless follower.target_actor.manually_approves_followers or
|
||||
follower.target_actor.id == relay_id do
|
||||
{:accept,
|
||||
ActivityPub.accept(
|
||||
:follow,
|
||||
|
|
Loading…
Reference in a new issue