From fef2c7164e025b12a64185dbab058ef4129733c6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 30 Nov 2017 14:15:17 +0100 Subject: Fix bad to/cc when undo dislike --- server/controllers/activitypub/inbox.ts | 2 +- server/lib/activitypub/send/send-undo.ts | 4 ++-- server/middlewares/validators/activitypub/activity.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server') 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 -- cgit v1.2.3