Fix bad to/cc when undo dislike

pull/143/head
Chocobozzz 2017-11-30 14:15:17 +01:00
parent f00984c007
commit fef2c7164e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ async function inboxController (req: express.Request, res: express.Response, nex
} }
// Only keep activities we are able to process // 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)) activities = activities.filter(a => isActivityValid(a))
logger.debug('We keep %d activities.', activities.length, { activities }) logger.debug('We keep %d activities.', activities.length, { activities })

View File

@ -67,9 +67,9 @@ async function sendUndoDislikeToOrigin (byAccount: AccountInstance, video: Video
const accountsInvolvedInVideo = await getAccountsInvolvedInVideo(video, t) const accountsInvolvedInVideo = await getAccountsInvolvedInVideo(video, t)
const audience = getOriginVideoAudience(video, accountsInvolvedInVideo) const audience = getOriginVideoAudience(video, accountsInvolvedInVideo)
const dislikeActivity = createDislikeActivityData(byAccount, video) 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) return unicastTo(data, byAccount, video.VideoChannel.Account.sharedInboxUrl, t)
} }

View File

@ -7,7 +7,7 @@ const activityPubValidator = [
body('').custom((value, { req }) => isRootActivityValid(req.body)), body('').custom((value, { req }) => isRootActivityValid(req.body)),
(req: express.Request, res: express.Response, next: express.NextFunction) => { (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 if (areValidationErrors(req, res)) return