diff options
Diffstat (limited to 'server/lib/activitypub/send/send-add.ts')
-rw-r--r-- | server/lib/activitypub/send/send-add.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/server/lib/activitypub/send/send-add.ts b/server/lib/activitypub/send/send-add.ts index 3012b7533..d8ac2853e 100644 --- a/server/lib/activitypub/send/send-add.ts +++ b/server/lib/activitypub/send/send-add.ts | |||
@@ -8,15 +8,22 @@ async function sendAddVideo (video: VideoInstance, t: Transaction) { | |||
8 | const byAccount = video.VideoChannel.Account | 8 | const byAccount = video.VideoChannel.Account |
9 | 9 | ||
10 | const videoObject = video.toActivityPubObject() | 10 | const videoObject = video.toActivityPubObject() |
11 | const data = await addActivityData(video.url, byAccount, video, video.VideoChannel.url, videoObject) | 11 | const data = await addActivityData(video.url, byAccount, video, video.VideoChannel.url, videoObject, t) |
12 | 12 | ||
13 | return broadcastToFollowers(data, byAccount, [ byAccount ], t) | 13 | return broadcastToFollowers(data, byAccount, [ byAccount ], t) |
14 | } | 14 | } |
15 | 15 | ||
16 | async function addActivityData (url: string, byAccount: AccountInstance, video: VideoInstance, target: string, object: any) { | 16 | async function addActivityData ( |
17 | url: string, | ||
18 | byAccount: AccountInstance, | ||
19 | video: VideoInstance, | ||
20 | target: string, | ||
21 | object: any, | ||
22 | t: Transaction | ||
23 | ) { | ||
17 | const videoPublic = video.privacy === VideoPrivacy.PUBLIC | 24 | const videoPublic = video.privacy === VideoPrivacy.PUBLIC |
18 | 25 | ||
19 | const { to, cc } = await getAudience(byAccount, videoPublic) | 26 | const { to, cc } = await getAudience(byAccount, t, videoPublic) |
20 | const activity: ActivityAdd = { | 27 | const activity: ActivityAdd = { |
21 | type: 'Add', | 28 | type: 'Add', |
22 | id: url, | 29 | id: url, |