mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 07:52:43 +00:00
Don't auto-approve instance follows
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
8e6aa8c85c
commit
076c14b54e
1 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.{Actor, Follower, Member}
|
alias Mobilizon.Actors.{Actor, Follower, Member}
|
||||||
alias Mobilizon.Federation.ActivityPub
|
alias Mobilizon.Federation.ActivityPub
|
||||||
alias Mobilizon.Federation.ActivityPub.Audience
|
alias Mobilizon.Federation.ActivityPub.{Audience, Relay}
|
||||||
alias Mobilizon.Federation.ActivityPub.Types.Entity
|
alias Mobilizon.Federation.ActivityPub.Types.Entity
|
||||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||||
alias Mobilizon.GraphQL.API.Utils, as: APIUtils
|
alias Mobilizon.GraphQL.API.Utils, as: APIUtils
|
||||||
|
@ -223,7 +223,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
||||||
%Follower{} = follower,
|
%Follower{} = follower,
|
||||||
follow_as_data
|
follow_as_data
|
||||||
) do
|
) 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,
|
{:accept,
|
||||||
ActivityPub.accept(
|
ActivityPub.accept(
|
||||||
:follow,
|
:follow,
|
||||||
|
|
Loading…
Reference in a new issue