Commit 7c31d6c9 authored by les's avatar les
Browse files

[fedi] minor

parent ae6a892f
......@@ -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])
......
......@@ -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())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment