From 5b9c965d5aa747f29b081289f930ee215fdc23c8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 8 Apr 2019 14:04:57 +0200 Subject: Add ability to forbid followers --- server/initializers/checker-before-init.ts | 3 ++- server/initializers/constants.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'server/initializers') diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index e26f38564..a9896907d 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -24,7 +24,8 @@ function checkMissedConfig () { 'trending.videos.interval_days', 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', 'instance.is_nsfw', 'instance.default_nsfw_policy', 'instance.robots', 'instance.securitytxt', - 'services.twitter.username', 'services.twitter.whitelisted' + 'services.twitter.username', 'services.twitter.whitelisted', + 'followers.instance.enabled' ] const requiredAlternatives = [ [ // set diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index ac19231d0..43c5ec54c 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -324,6 +324,11 @@ const CONFIG = { get USERNAME () { return config.get('services.twitter.username') }, get WHITELISTED () { return config.get('services.twitter.whitelisted') } } + }, + FOLLOWERS: { + INSTANCE: { + get ENABLED () { return config.get('followers.instance.enabled') } + } } } -- cgit v1.2.3