minor on fedi
This commit is contained in:
parent
71a4c83c51
commit
6f35e2e1e2
3 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ module.exports = {
|
||||||
actor: `${config.baseurl}/federation/u/${username}`,
|
actor: `${config.baseurl}/federation/u/${username}`,
|
||||||
object: body
|
object: body
|
||||||
}
|
}
|
||||||
Helpers.signAndSend(message, req.fedi_user.object.inbox)
|
Helpers.signAndSend(JSON.stringify(message), req.fedi_user.object.inbox)
|
||||||
res.sendStatus(200)
|
res.sendStatus(200)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ const Helpers = {
|
||||||
signer.end()
|
signer.end()
|
||||||
const signature = signer.sign(privkey)
|
const signature = signer.sign(privkey)
|
||||||
const signature_b64 = signature.toString('base64')
|
const signature_b64 = signature.toString('base64')
|
||||||
const header = `keyId="${config.baseurl}/federation/u/${settingsController.settings.instance_name}",algorithm="rsa-sha265",headers="(request-target) host date digest",signature="${signature_b64}"`
|
const header = `keyId="${config.baseurl}/federation/u/${settingsController.settings.instance_name}",algorithm="rsa-sha256",headers="(request-target) host date digest",signature="${signature_b64}"`
|
||||||
try {
|
try {
|
||||||
const ret = await axios(inbox, {
|
const ret = await axios(inbox, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -105,7 +105,7 @@ module.exports = {
|
||||||
return res.status(404).send(`No record found for ${name}`)
|
return res.status(404).send(`No record found for ${name}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const events = await Event.findAll({ include: [{ model: Tag, required: false }, Place] })
|
const events = await Event.findAll({ include: [{ model: Tag, required: false }, Place], limit: 10 })
|
||||||
log.debug(`${config.baseurl} Inside ${name} outbox, should return all events from this instance: ${events.length}`)
|
log.debug(`${config.baseurl} Inside ${name} outbox, should return all events from this instance: ${events.length}`)
|
||||||
|
|
||||||
// https://www.w3.org/TR/activitypub/#outbox
|
// https://www.w3.org/TR/activitypub/#outbox
|
||||||
|
|
Loading…
Reference in a new issue