Skip to content
GitLab
Menu
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
948e34ef
Commit
948e34ef
authored
Jul 30, 2019
by
les
Browse files
minor
parent
5d864ff8
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/federation/follows.js
View file @
948e34ef
...
...
@@ -5,7 +5,7 @@ const { user: User } = require('../api/models')
module
.
exports
=
{
// follow request from fediverse
async
follow
(
req
,
res
,
body
,
targetOrigin
,
domain
)
{
if
(
typeof
b
.
object
!==
'
string
'
)
return
if
(
typeof
b
ody
.
object
!==
'
string
'
)
return
const
username
=
body
.
object
.
replace
(
`
${
config
.
baseurl
}
/federation/u/`
,
''
)
console
.
error
(
'
someone wants to follow
'
+
username
)
const
user
=
await
User
.
findOne
({
where
:
{
username
}})
...
...
@@ -25,4 +25,4 @@ module.exports = {
unfollow
()
{
console
.
error
(
'
inside unfollow
'
)
}
}
\ No newline at end of file
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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