mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Optimize broadcast job creation
This commit is contained in:
parent
b9e49a45f5
commit
3396e65345
6 changed files with 49 additions and 62 deletions
|
@ -19,13 +19,13 @@ async function sendVideoRelatedActivity (activityBuilder: (audience: ActivityAud
|
|||
}) {
|
||||
const { byActor, video, transaction, contextType } = options
|
||||
|
||||
const actorsInvolvedInVideo = await getActorsInvolvedInVideo(video, transaction)
|
||||
|
||||
// Send to origin
|
||||
if (video.isOwned() === false) {
|
||||
return sendVideoActivityToOrigin(activityBuilder, options)
|
||||
}
|
||||
|
||||
const actorsInvolvedInVideo = await getActorsInvolvedInVideo(video, transaction)
|
||||
|
||||
// Send to followers
|
||||
const audience = getAudienceFromFollowersOf(actorsInvolvedInVideo)
|
||||
const activity = activityBuilder(audience)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue