[fedi] minor
This commit is contained in:
@@ -79,8 +79,8 @@ const Helpers = {
|
|||||||
id: `${config.baseurl}/federation/m/${event.id}#create`,
|
id: `${config.baseurl}/federation/m/${event.id}#create`,
|
||||||
type: 'Create',
|
type: 'Create',
|
||||||
to: ['https://www.w3.org/ns/activitystreams#Public'],
|
to: ['https://www.w3.org/ns/activitystreams#Public'],
|
||||||
// cc: [`${config.baseurl}/federation/u/${instanceAdmin.username}/followers`, ...recipients[sharedInbox]],
|
cc: [`${config.baseurl}/federation/u/${instanceAdmin.username}/followers`, ...recipients[sharedInbox]],
|
||||||
cc: recipients[sharedInbox],
|
//cc: recipients[sharedInbox],
|
||||||
actor: `${config.baseurl}/federation/u/${instanceAdmin.username}`,
|
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, [`${config.baseurl}/federation/u/${instanceAdmin.username}/followers`, ...recipients[sharedInbox]])
|
||||||
object: event.toAP(instanceAdmin.username, recipients[sharedInbox])
|
object: event.toAP(instanceAdmin.username, recipients[sharedInbox])
|
||||||
@@ -115,8 +115,8 @@ const Helpers = {
|
|||||||
id: `${config.baseurl}/federation/m/${event.id}#create`,
|
id: `${config.baseurl}/federation/m/${event.id}#create`,
|
||||||
type: 'Create',
|
type: 'Create',
|
||||||
to: ['https://www.w3.org/ns/activitystreams#Public'],
|
to: ['https://www.w3.org/ns/activitystreams#Public'],
|
||||||
// cc: [`${config.baseurl}/federation/u/${user.username}/followers`, ...recipients[sharedInbox]],
|
cc: [`${config.baseurl}/federation/u/${user.username}/followers`, ...recipients[sharedInbox]],
|
||||||
cc: recipients[sharedInbox],
|
//cc: recipients[sharedInbox],
|
||||||
actor: `${config.baseurl}/federation/u/${user.username}`,
|
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, [`${config.baseurl}/federation/u/${user.username}/followers`, ...recipients[sharedInbox]])
|
||||||
object: event.toAP(user.username, recipients[sharedInbox])
|
object: event.toAP(user.username, recipients[sharedInbox])
|
||||||
|
|||||||
@@ -16,9 +16,10 @@ const debug = require('debug')('federation')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
if(settingsController.settings.enable_federation) next()
|
if(settingsController.settings.enable_federation) return next()
|
||||||
debug('Federation disabled!')
|
debug('Federation disabled!')
|
||||||
return res.status(401).send('Federation disabled')
|
res.status(401).send('Federation disabled')
|
||||||
|
next(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
router.use(cors())
|
router.use(cors())
|
||||||
|
|||||||
Reference in New Issue
Block a user