Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
les
gancio
Commits
7c31d6c9
Commit
7c31d6c9
authored
Sep 26, 2019
by
les
Browse files
[fedi] minor
parent
ae6a892f
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/federation/helpers.js
View file @
7c31d6c9
...
...
@@ -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
])
...
...
server/federation/index.js
View file @
7c31d6c9
...
...
@@ -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
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment