aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-01 16:47:14 +0200
committerChocobozzz <me@florianbigard.com>2021-07-01 16:47:14 +0200
commit06c27593386459b0f6b85fc674460ea5af23f7f1 (patch)
tree37b126b16b9f482e4c36a01d08434c659882521b /server/lib/activitypub
parent693c6586cb896a84ff0f897b1c242bcf7bdcbaee (diff)
downloadPeerTube-06c27593386459b0f6b85fc674460ea5af23f7f1.tar.gz
PeerTube-06c27593386459b0f6b85fc674460ea5af23f7f1.tar.zst
PeerTube-06c27593386459b0f6b85fc674460ea5af23f7f1.zip
Fix hooks definition
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/send/utils.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/activitypub/send/utils.ts b/server/lib/activitypub/send/utils.ts
index db0e91b71..7cd8030e1 100644
--- a/server/lib/activitypub/send/utils.ts
+++ b/server/lib/activitypub/send/utils.ts
@@ -22,7 +22,9 @@ async function sendVideoRelatedActivity (activityBuilder: (audience: ActivityAud
22 22
23 // Send to origin 23 // Send to origin
24 if (video.isOwned() === false) { 24 if (video.isOwned() === false) {
25 const accountActor = (video as MVideoAccountLight).VideoChannel?.Account?.Actor || await ActorModel.loadAccountActorByVideoId(video.id) 25 let accountActor: MActorLight = (video as MVideoAccountLight).VideoChannel?.Account?.Actor
26
27 if (!accountActor) accountActor = await ActorModel.loadAccountActorByVideoId(video.id, transaction)
26 28
27 const audience = getRemoteVideoAudience(accountActor, actorsInvolvedInVideo) 29 const audience = getRemoteVideoAudience(accountActor, actorsInvolvedInVideo)
28 const activity = activityBuilder(audience) 30 const activity = activityBuilder(audience)