diff options
Diffstat (limited to 'server/lib/activitypub/send/send-announce.ts')
-rw-r--r-- | server/lib/activitypub/send/send-announce.ts | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/server/lib/activitypub/send/send-announce.ts b/server/lib/activitypub/send/send-announce.ts index 7897beb75..6c078b047 100644 --- a/server/lib/activitypub/send/send-announce.ts +++ b/server/lib/activitypub/send/send-announce.ts | |||
@@ -23,13 +23,19 @@ async function buildAnnounceWithVideoAudience ( | |||
23 | return { activity, actorsInvolvedInVideo } | 23 | return { activity, actorsInvolvedInVideo } |
24 | } | 24 | } |
25 | 25 | ||
26 | async function sendVideoAnnounce (byActor: MActorLight, videoShare: MVideoShare, video: MVideo, t: Transaction) { | 26 | async function sendVideoAnnounce (byActor: MActorLight, videoShare: MVideoShare, video: MVideo, transaction: Transaction) { |
27 | const { activity, actorsInvolvedInVideo } = await buildAnnounceWithVideoAudience(byActor, videoShare, video, t) | 27 | const { activity, actorsInvolvedInVideo } = await buildAnnounceWithVideoAudience(byActor, videoShare, video, transaction) |
28 | 28 | ||
29 | logger.info('Creating job to send announce %s.', videoShare.url) | 29 | logger.info('Creating job to send announce %s.', videoShare.url) |
30 | 30 | ||
31 | const followersException = [ byActor ] | 31 | return broadcastToFollowers({ |
32 | return broadcastToFollowers(activity, byActor, actorsInvolvedInVideo, t, followersException, 'Announce') | 32 | data: activity, |
33 | byActor, | ||
34 | toFollowersOf: actorsInvolvedInVideo, | ||
35 | transaction, | ||
36 | actorsException: [ byActor ], | ||
37 | contextType: 'Announce' | ||
38 | }) | ||
33 | } | 39 | } |
34 | 40 | ||
35 | function buildAnnounceActivity (url: string, byActor: MActorLight, object: string, audience?: ActivityAudience): ActivityAnnounce { | 41 | function buildAnnounceActivity (url: string, byActor: MActorLight, object: string, audience?: ActivityAudience): ActivityAnnounce { |