From 7c31d6c969d263e2656327ae1bd0d62f61858ea0 Mon Sep 17 00:00:00 2001 From: les Date: Thu, 26 Sep 2019 00:24:05 +0200 Subject: [PATCH] [fedi] minor --- server/federation/helpers.js | 8 ++++---- server/federation/index.js | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/federation/helpers.js b/server/federation/helpers.js index 1a4908e4..6f6a58cb 100644 --- a/server/federation/helpers.js +++ b/server/federation/helpers.js @@ -79,8 +79,8 @@ const Helpers = { id: `${config.baseurl}/federation/m/${event.id}#create`, type: 'Create', to: ['https://www.w3.org/ns/activitystreams#Public'], - // cc: [`${config.baseurl}/federation/u/${instanceAdmin.username}/followers`, ...recipients[sharedInbox]], - cc: recipients[sharedInbox], + cc: [`${config.baseurl}/federation/u/${instanceAdmin.username}/followers`, ...recipients[sharedInbox]], + //cc: recipients[sharedInbox], actor: `${config.baseurl}/federation/u/${instanceAdmin.username}`, // object: event.toAP(instanceAdmin.username, [`${config.baseurl}/federation/u/${instanceAdmin.username}/followers`, ...recipients[sharedInbox]]) object: event.toAP(instanceAdmin.username, recipients[sharedInbox]) @@ -115,8 +115,8 @@ const Helpers = { id: `${config.baseurl}/federation/m/${event.id}#create`, type: 'Create', to: ['https://www.w3.org/ns/activitystreams#Public'], - // cc: [`${config.baseurl}/federation/u/${user.username}/followers`, ...recipients[sharedInbox]], - cc: recipients[sharedInbox], + cc: [`${config.baseurl}/federation/u/${user.username}/followers`, ...recipients[sharedInbox]], + //cc: recipients[sharedInbox], actor: `${config.baseurl}/federation/u/${user.username}`, // object: event.toAP(user.username, [`${config.baseurl}/federation/u/${user.username}/followers`, ...recipients[sharedInbox]]) object: event.toAP(user.username, recipients[sharedInbox]) diff --git a/server/federation/index.js b/server/federation/index.js index f6b7b5e5..4cc0c68c 100644 --- a/server/federation/index.js +++ b/server/federation/index.js @@ -16,9 +16,10 @@ const debug = require('debug')('federation') */ router.use((req, res, next) => { - if(settingsController.settings.enable_federation) next() + if(settingsController.settings.enable_federation) return next() debug('Federation disabled!') - return res.status(401).send('Federation disabled') + res.status(401).send('Federation disabled') + next(false) }) router.use(cors())