]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/activitypub/activity.ts
Server: Bulk update videos support field
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / activitypub / activity.ts
index 4aace4c8e6f7bc60b93c4145e78aed10989955a7..7582f65e76f4c4d41004f41e33a99aa4334b20f1 100644 (file)
@@ -1,10 +1,7 @@
 import * as express from 'express'
-import { body } from 'express-validator/check'
 import { isRootActivityValid } from '../../../helpers/custom-validators/activitypub/activity'
 import { logger } from '../../../helpers/logger'
 import { getServerActor } from '../../../helpers/utils'
-import { ActorModel } from '../../../models/activitypub/actor'
-import { areValidationErrors } from '../utils'
 
 async function activityPubValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
   logger.debug('Checking activity pub parameters')
@@ -15,7 +12,7 @@ async function activityPubValidator (req: express.Request, res: express.Response
   }
 
   const serverActor = await getServerActor()
-  const remoteActor = res.locals.signature.actor as ActorModel
+  const remoteActor = res.locals.signature.actor
   if (serverActor.id === remoteActor.id) {
     logger.error('Receiving request in INBOX by ourselves!', req.body)
     return res.status(409).end()