]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix bad to/cc when undo dislike
authorChocobozzz <florian.bigard@gmail.com>
Thu, 30 Nov 2017 13:15:17 +0000 (14:15 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Thu, 30 Nov 2017 13:15:17 +0000 (14:15 +0100)
server/controllers/activitypub/inbox.ts
server/lib/activitypub/send/send-undo.ts
server/middlewares/validators/activitypub/activity.ts

index 92bd20ddb0ffd25a3e864ce9d76f543606614ec2..88a0834f61797ea44c63431764f9f326667f37e1 100644 (file)
@@ -44,7 +44,7 @@ async function inboxController (req: express.Request, res: express.Response, nex
   }
 
   // Only keep activities we are able to process
-  logger.debug('Filtering activities...', { activities })
+  logger.debug('Filtering %d activities...', activities.length)
   activities = activities.filter(a => isActivityValid(a))
   logger.debug('We keep %d activities.', activities.length, { activities })
 
index 2f5e6998e194d906340d37710b93a911fde3c06c..015f02b354245904ca58bbc67d4a4e237b55c8b0 100644 (file)
@@ -67,9 +67,9 @@ async function sendUndoDislikeToOrigin (byAccount: AccountInstance, video: Video
   const accountsInvolvedInVideo = await getAccountsInvolvedInVideo(video, t)
   const audience = getOriginVideoAudience(video, accountsInvolvedInVideo)
   const dislikeActivity = createDislikeActivityData(byAccount, video)
-  const object = await createActivityData(undoUrl, byAccount, dislikeActivity, t, audience)
+  const object = await createActivityData(undoUrl, byAccount, dislikeActivity, t)
 
-  const data = await undoActivityData(undoUrl, byAccount, object, t)
+  const data = await undoActivityData(undoUrl, byAccount, object, t, audience)
 
   return unicastTo(data, byAccount, video.VideoChannel.Account.sharedInboxUrl, t)
 }
index 8aa82298ccb1320def7c2d6083222a59dc9ee3c5..c63be5979053cec022d2f594db54b2f6bd7b569c 100644 (file)
@@ -7,7 +7,7 @@ const activityPubValidator = [
   body('').custom((value, { req }) => isRootActivityValid(req.body)),
 
   (req: express.Request, res: express.Response, next: express.NextFunction) => {
-    logger.debug('Checking activity pub parameters', { parameters: req.body })
+    logger.debug('Checking activity pub parameters')
 
     if (areValidationErrors(req, res)) return