1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Detect posting request in our own inbox

This commit is contained in:
Chocobozzz 2018-02-23 15:09:12 +01:00
parent 1ee48d1903
commit 285fe7c930
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 21 additions and 3 deletions

View file

@ -1,7 +1,16 @@
import { logger } from '../../helpers/logger'
import { getServerActor } from '../../helpers/utils'
import { ActorModel } from '../../models/activitypub/actor'
import { JobQueue } from '../job-queue'
async function addFetchOutboxJob (actor: ActorModel) {
// Don't fetch ourselves
const serverActor = await getServerActor()
if (serverActor.id === actor.id) {
logger.error('Cannot fetch our own outbox!')
return
}
const payload = {
uris: [ actor.outboxUrl ]
}