aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/send/send-update.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/send/send-update.ts')
-rw-r--r--server/lib/activitypub/send/send-update.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/lib/activitypub/send/send-update.ts b/server/lib/activitypub/send/send-update.ts
index 32cada06e..59524e523 100644
--- a/server/lib/activitypub/send/send-update.ts
+++ b/server/lib/activitypub/send/send-update.ts
@@ -10,9 +10,9 @@ async function sendUpdateVideoChannel (videoChannel: VideoChannelInstance, t: Tr
10 10
11 const url = getUpdateActivityPubUrl(videoChannel.url, videoChannel.updatedAt.toISOString()) 11 const url = getUpdateActivityPubUrl(videoChannel.url, videoChannel.updatedAt.toISOString())
12 const videoChannelObject = videoChannel.toActivityPubObject() 12 const videoChannelObject = videoChannel.toActivityPubObject()
13 const data = await updateActivityData(url, byAccount, videoChannelObject) 13 const data = await updateActivityData(url, byAccount, videoChannelObject, t)
14 14
15 const accountsInvolved = await db.VideoChannelShare.loadAccountsByShare(videoChannel.id) 15 const accountsInvolved = await db.VideoChannelShare.loadAccountsByShare(videoChannel.id, t)
16 accountsInvolved.push(byAccount) 16 accountsInvolved.push(byAccount)
17 17
18 return broadcastToFollowers(data, byAccount, accountsInvolved, t) 18 return broadcastToFollowers(data, byAccount, accountsInvolved, t)
@@ -23,9 +23,9 @@ async function sendUpdateVideo (video: VideoInstance, t: Transaction) {
23 23
24 const url = getUpdateActivityPubUrl(video.url, video.updatedAt.toISOString()) 24 const url = getUpdateActivityPubUrl(video.url, video.updatedAt.toISOString())
25 const videoObject = video.toActivityPubObject() 25 const videoObject = video.toActivityPubObject()
26 const data = await updateActivityData(url, byAccount, videoObject) 26 const data = await updateActivityData(url, byAccount, videoObject, t)
27 27
28 const accountsInvolved = await db.VideoShare.loadAccountsByShare(video.id) 28 const accountsInvolved = await db.VideoShare.loadAccountsByShare(video.id, t)
29 accountsInvolved.push(byAccount) 29 accountsInvolved.push(byAccount)
30 30
31 return broadcastToFollowers(data, byAccount, accountsInvolved, t) 31 return broadcastToFollowers(data, byAccount, accountsInvolved, t)
@@ -40,8 +40,8 @@ export {
40 40
41// --------------------------------------------------------------------------- 41// ---------------------------------------------------------------------------
42 42
43async function updateActivityData (url: string, byAccount: AccountInstance, object: any) { 43async function updateActivityData (url: string, byAccount: AccountInstance, object: any, t: Transaction) {
44 const { to, cc } = await getAudience(byAccount) 44 const { to, cc } = await getAudience(byAccount, t)
45 const activity: ActivityUpdate = { 45 const activity: ActivityUpdate = {
46 type: 'Update', 46 type: 'Update',
47 id: url, 47 id: url,