- const followersException = [ byAccount ]
- return broadcastToFollowers(data, byAccount, accountsToForwardView, t, followersException)
+ const actorsInvolvedInVideo = await getActorsInvolvedInVideo(video, t)
+
+ // Send to origin
+ if (video.isOwned() === false) {
+ const audience = getVideoAudience(video, actorsInvolvedInVideo)
+ const data = createActivityData(url, byActor, viewActivityData, audience)
+
+ return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl)
+ }
+
+ // Send to followers
+ const audience = getObjectFollowersAudience(actorsInvolvedInVideo)
+ const data = createActivityData(url, byActor, viewActivityData, audience)
+
+ // Use the server actor to send the view
+ const serverActor = await getServerActor()
+ const actorsException = [ byActor ]
+ return broadcastToFollowers(data, serverActor, actorsInvolvedInVideo, t, actorsException)