aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r--server/controllers/activitypub/client.ts2
-rw-r--r--server/controllers/activitypub/outbox.ts5
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
101async function videoAnnounceController (req: express.Request, res: express.Response, next: express.NextFunction) { 101async 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'
5import { ACTIVITY_PUB } from '../../initializers/constants' 5import { ACTIVITY_PUB } from '../../initializers/constants'
6import { announceActivityData, createActivityData } from '../../lib/activitypub/send' 6import { announceActivityData, createActivityData } from '../../lib/activitypub/send'
7import { buildAudience } from '../../lib/activitypub/send/misc' 7import { buildAudience } from '../../lib/activitypub/send/misc'
8import { getAnnounceActivityPubUrl } from '../../lib/activitypub/url'
9import { asyncMiddleware, localAccountValidator } from '../../middlewares' 8import { asyncMiddleware, localAccountValidator } from '../../middlewares'
10import { AccountModel } from '../../models/account/account' 9import { AccountModel } from '../../models/account/account'
11import { ActorModel } from '../../models/activitypub/actor' 10import { 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 {