From: Chocobozzz Date: Thu, 30 Nov 2017 13:15:17 +0000 (+0100) Subject: Fix bad to/cc when undo dislike X-Git-Tag: v0.0.1-alpha~152 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=fef2c7164e025b12a64185dbab058ef4129733c6;p=github%2FChocobozzz%2FPeerTube.git Fix bad to/cc when undo dislike --- diff --git a/server/controllers/activitypub/inbox.ts b/server/controllers/activitypub/inbox.ts index 92bd20ddb..88a0834f6 100644 --- a/server/controllers/activitypub/inbox.ts +++ b/server/controllers/activitypub/inbox.ts @@ -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 }) diff --git a/server/lib/activitypub/send/send-undo.ts b/server/lib/activitypub/send/send-undo.ts index 2f5e6998e..015f02b35 100644 --- a/server/lib/activitypub/send/send-undo.ts +++ b/server/lib/activitypub/send/send-undo.ts @@ -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) } diff --git a/server/middlewares/validators/activitypub/activity.ts b/server/middlewares/validators/activitypub/activity.ts index 8aa82298c..c63be5979 100644 --- a/server/middlewares/validators/activitypub/activity.ts +++ b/server/middlewares/validators/activitypub/activity.ts @@ -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