diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/activitypub/outbox.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts index 86cdcf4cd..c0c0c9d1c 100644 --- a/server/controllers/activitypub/outbox.ts +++ b/server/controllers/activitypub/outbox.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { Activity } from '../../../shared/models/activitypub/activity' | 2 | import { Activity } from '../../../shared/models/activitypub/activity' |
3 | import { VideoPrivacy } from '../../../shared/models/videos' | ||
3 | import { activityPubCollectionPagination } from '../../helpers/activitypub' | 4 | import { activityPubCollectionPagination } from '../../helpers/activitypub' |
4 | import { pageToStartAndCount } from '../../helpers/core-utils' | 5 | import { pageToStartAndCount } from '../../helpers/core-utils' |
5 | import { ACTIVITY_PUB } from '../../initializers/constants' | 6 | import { ACTIVITY_PUB } from '../../initializers/constants' |
@@ -43,12 +44,12 @@ async function outboxController (req: express.Request, res: express.Response, ne | |||
43 | 44 | ||
44 | for (const video of data.data) { | 45 | for (const video of data.data) { |
45 | const byActor = video.VideoChannel.Account.Actor | 46 | const byActor = video.VideoChannel.Account.Actor |
46 | const createActivityAudience = buildAudience(followersMatrix[byActor.id]) | 47 | const createActivityAudience = buildAudience(followersMatrix[byActor.id], video.privacy === VideoPrivacy.PUBLIC) |
47 | 48 | ||
48 | // This is a shared video | 49 | // This is a shared video |
49 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { | 50 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { |
50 | const videoShare = video.VideoShares[0] | 51 | const videoShare = video.VideoShares[0] |
51 | const announceAudience = buildAudience(followersMatrix[actor.id]) | 52 | const announceAudience = buildAudience(followersMatrix[actor.id], video.privacy === VideoPrivacy.PUBLIC) |
52 | const announceActivity = await announceActivityData(videoShare.url, actor, video.url, undefined, announceAudience) | 53 | const announceActivity = await announceActivityData(videoShare.url, actor, video.url, undefined, announceAudience) |
53 | 54 | ||
54 | activities.push(announceActivity) | 55 | activities.push(announceActivity) |