diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/activitypub/client.ts | 2 | ||||
-rw-r--r-- | server/controllers/activitypub/outbox.ts | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 2587ee212..7b60cc311 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -100,7 +100,7 @@ async function videoController (req: express.Request, res: express.Response, nex | |||
100 | 100 | ||
101 | async function videoAnnounceController (req: express.Request, res: express.Response, next: express.NextFunction) { | 101 | async function videoAnnounceController (req: express.Request, res: express.Response, next: express.NextFunction) { |
102 | const share = res.locals.videoShare as VideoShareModel | 102 | const share = res.locals.videoShare as VideoShareModel |
103 | const object = await buildVideoAnnounceToFollowers(share.Actor, res.locals.video, undefined) | 103 | const object = await buildVideoAnnounceToFollowers(share.Actor, share, res.locals.video, undefined) |
104 | 104 | ||
105 | return res.json(activityPubContextify(object)) | 105 | return res.json(activityPubContextify(object)) |
106 | } | 106 | } |
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts index 41c6ffaeb..86cdcf4cd 100644 --- a/server/controllers/activitypub/outbox.ts +++ b/server/controllers/activitypub/outbox.ts | |||
@@ -5,7 +5,6 @@ import { pageToStartAndCount } from '../../helpers/core-utils' | |||
5 | import { ACTIVITY_PUB } from '../../initializers/constants' | 5 | import { ACTIVITY_PUB } from '../../initializers/constants' |
6 | import { announceActivityData, createActivityData } from '../../lib/activitypub/send' | 6 | import { announceActivityData, createActivityData } from '../../lib/activitypub/send' |
7 | import { buildAudience } from '../../lib/activitypub/send/misc' | 7 | import { buildAudience } from '../../lib/activitypub/send/misc' |
8 | import { getAnnounceActivityPubUrl } from '../../lib/activitypub/url' | ||
9 | import { asyncMiddleware, localAccountValidator } from '../../middlewares' | 8 | import { asyncMiddleware, localAccountValidator } from '../../middlewares' |
10 | import { AccountModel } from '../../models/account/account' | 9 | import { AccountModel } from '../../models/account/account' |
11 | import { ActorModel } from '../../models/activitypub/actor' | 10 | import { ActorModel } from '../../models/activitypub/actor' |
@@ -48,9 +47,9 @@ async function outboxController (req: express.Request, res: express.Response, ne | |||
48 | 47 | ||
49 | // This is a shared video | 48 | // This is a shared video |
50 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { | 49 | if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { |
50 | const videoShare = video.VideoShares[0] | ||
51 | const announceAudience = buildAudience(followersMatrix[actor.id]) | 51 | const announceAudience = buildAudience(followersMatrix[actor.id]) |
52 | const url = getAnnounceActivityPubUrl(video.url, actor) | 52 | const announceActivity = await announceActivityData(videoShare.url, actor, video.url, undefined, announceAudience) |
53 | const announceActivity = await announceActivityData(url, actor, video.url, undefined, announceAudience) | ||
54 | 53 | ||
55 | activities.push(announceActivity) | 54 | activities.push(announceActivity) |
56 | } else { | 55 | } else { |