mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Add needed env var PRIVATE_KEY_PASSPHRASE + fix WebFinger test
This commit is contained in:
parent
30fc07e16e
commit
53a2440e3c
@ -22,6 +22,7 @@ let activityPub = null
|
||||
export { activityPub }
|
||||
|
||||
export default class ActivityPub {
|
||||
|
||||
constructor (activityPubEndpointUri, internalGraphQlUri) {
|
||||
this.endpoint = activityPubEndpointUri
|
||||
this.dataSource = new NitroDataSource(internalGraphQlUri)
|
||||
@ -56,7 +57,6 @@ export default class ActivityPub {
|
||||
}
|
||||
}, async (err, response, toActorObject) => {
|
||||
if (err) return reject(err)
|
||||
debug(`name = ${toActorName}@${this.host}`)
|
||||
// save shared inbox
|
||||
toActorObject = JSON.parse(toActorObject)
|
||||
await this.dataSource.addSharedInboxEndpoint(toActorObject.endpoints.sharedInbox)
|
||||
|
||||
@ -19,7 +19,6 @@ export function extractIdFromActivityId (uri) {
|
||||
|
||||
return splitted[splitted.indexOf('status') + 1]
|
||||
}
|
||||
|
||||
export function constructIdFromName (name, fromDomain = activityPub.endpoint) {
|
||||
return `${fromDomain}/activitypub/users/${name}`
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ import decode from './jwt/decode'
|
||||
|
||||
dotenv.config()
|
||||
// check env and warn
|
||||
const requiredEnvVars = ['MAPBOX_TOKEN', 'JWT_SECRET']
|
||||
const requiredEnvVars = ['MAPBOX_TOKEN', 'JWT_SECRET', 'PRIVATE_KEY_PASSPHRASE']
|
||||
requiredEnvVars.forEach(env => {
|
||||
if (!process.env[env]) {
|
||||
throw new Error(`ERROR: "${env}" env variable is missing.`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user