Skip to content
Snippets Groups Projects
Verified Commit 514e48d3 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Library can now automatically accept follows

parent 4320fc77
No related tags found
No related merge requests found
...@@ -203,6 +203,20 @@ class LibraryActor(SystemActor): ...@@ -203,6 +203,20 @@ class LibraryActor(SystemActor):
def manually_approves_followers(self): def manually_approves_followers(self):
return settings.FEDERATION_MUSIC_NEEDS_APPROVAL return settings.FEDERATION_MUSIC_NEEDS_APPROVAL
def handle_follow(self, ac, sender):
system_actor = self.get_actor_instance()
if self.manually_approves_followers:
fr, created = models.FollowRequest.objects.get_or_create(
actor=sender,
target=system_actor,
approved=None,
)
return fr
return activity.accept_follow(
system_actor, ac, sender
)
@transaction.atomic @transaction.atomic
def handle_create(self, ac, sender): def handle_create(self, ac, sender):
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment