This commit is contained in:
lesion
2019-07-30 18:56:32 +02:00
parent 5d864ff884
commit 948e34efb0

View File

@@ -5,7 +5,7 @@ const { user: User } = require('../api/models')
module.exports = { module.exports = {
// follow request from fediverse // follow request from fediverse
async follow (req, res, body, targetOrigin, domain) { async follow (req, res, body, targetOrigin, domain) {
if (typeof b.object !== 'string') return if (typeof body.object !== 'string') return
const username = body.object.replace(`${config.baseurl}/federation/u/`, '') const username = body.object.replace(`${config.baseurl}/federation/u/`, '')
console.error('someone wants to follow ' + username) console.error('someone wants to follow ' + username)
const user = await User.findOne({ where: { username }}) const user = await User.findOne({ where: { username }})