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:
parent
1ee48d1903
commit
285fe7c930
3 changed files with 21 additions and 3 deletions
|
@ -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 ]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue