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/controllers/api/config.ts | 5 +++++ server/controllers/api/server/follows.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index bd0ba4f9d..f9bb0b947 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts @@ -279,6 +279,11 @@ function customConfig (): CustomConfig { enabled: CONFIG.AUTO_BLACKLIST.VIDEOS.OF_USERS.ENABLED } } + }, + followers: { + instance: { + enabled: CONFIG.FOLLOWERS.INSTANCE.ENABLED + } } } } diff --git a/server/controllers/api/server/follows.ts b/server/controllers/api/server/follows.ts index c00069f93..87cf091cb 100644 --- a/server/controllers/api/server/follows.ts +++ b/server/controllers/api/server/follows.ts @@ -139,7 +139,7 @@ async function removeFollowing (req: express.Request, res: express.Response) { async function removeFollower (req: express.Request, res: express.Response) { const follow = res.locals.follow - await sendReject(follow) + await sendReject(follow.ActorFollower, follow.ActorFollowing) await follow.destroy() -- cgit v1.2.3