Additional setting to control wether music library federation needs approval

This commit is contained in:
Eliot Berriot 2018-04-02 22:43:59 +02:00
parent 48df30dbd8
commit a81c92dbf5
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
5 changed files with 50 additions and 1 deletions

View file

@ -47,6 +47,7 @@ def get_actor(actor_url):
class SystemActor(object):
additional_attributes = {}
manually_approves_followers = False
def get_actor_instance(self):
args = self.get_instance_argument(
@ -113,6 +114,9 @@ class LibraryActor(SystemActor):
additional_attributes = {
'manually_approves_followers': True
}
@property
def manually_approves_followers(self):
return settings.FEDERATION_MUSIC_NEEDS_APPROVAL
class TestActor(SystemActor):
@ -125,6 +129,7 @@ class TestActor(SystemActor):
additional_attributes = {
'manually_approves_followers': False
}
manually_approves_followers = False
def get_outbox(self, data, actor=None):
return {