1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Move config in its own file

This commit is contained in:
Chocobozzz 2019-04-11 11:33:44 +02:00
parent 2c3abc4fa7
commit 6dd9de95df
No known key found for this signature in database
GPG key ID: 583A612D890159BE
79 changed files with 523 additions and 458 deletions

View file

@ -1,6 +1,6 @@
import * as Bull from 'bull'
import { logger } from '../../../helpers/logger'
import { CONFIG, REMOTE_SCHEME, sequelizeTypescript } from '../../../initializers'
import { REMOTE_SCHEME, sequelizeTypescript, WEBSERVER } from '../../../initializers'
import { sendFollow } from '../../activitypub/send'
import { sanitizeHost } from '../../../helpers/core-utils'
import { loadActorUrlOrGetFromWebfinger } from '../../../helpers/webfinger'
@ -23,7 +23,7 @@ async function processActivityPubFollow (job: Bull.Job) {
logger.info('Processing ActivityPub follow in job %d.', job.id)
let targetActor: ActorModel
if (!host || host === CONFIG.WEBSERVER.HOST) {
if (!host || host === WEBSERVER.HOST) {
targetActor = await ActorModel.loadLocalByName(payload.name)
} else {
const sanitizedHost = sanitizeHost(host, REMOTE_SCHEME.HTTP)