aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r--server/controllers/activitypub/client.ts4
-rw-r--r--server/controllers/activitypub/outbox.ts7
2 files changed, 6 insertions, 5 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index 62cde1fc7..a478acd14 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -73,7 +73,7 @@ async function accountFollowersController (req: express.Request, res: express.Re
73 const page = req.query.page || 1 73 const page = req.query.page || 1
74 const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) 74 const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE)
75 75
76 const result = await db.AccountFollow.listAcceptedFollowerUrlsForApi([ account.id ], start, count) 76 const result = await db.AccountFollow.listAcceptedFollowerUrlsForApi([ account.id ], undefined, start, count)
77 const activityPubResult = activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.url, page, result) 77 const activityPubResult = activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.url, page, result)
78 78
79 return res.json(activityPubResult) 79 return res.json(activityPubResult)
@@ -85,7 +85,7 @@ async function accountFollowingController (req: express.Request, res: express.Re
85 const page = req.query.page || 1 85 const page = req.query.page || 1
86 const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE) 86 const { start, count } = pageToStartAndCount(page, ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE)
87 87
88 const result = await db.AccountFollow.listAcceptedFollowingUrlsForApi([ account.id ], start, count) 88 const result = await db.AccountFollow.listAcceptedFollowingUrlsForApi([ account.id ], undefined, start, count)
89 const activityPubResult = activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.url, page, result) 89 const activityPubResult = activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.url, page, result)
90 90
91 return res.json(activityPubResult) 91 return res.json(activityPubResult)
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts
index e2c4e9b1e..5a2d43f3d 100644
--- a/server/controllers/activitypub/outbox.ts
+++ b/server/controllers/activitypub/outbox.ts
@@ -38,15 +38,16 @@ async function outboxController (req: express.Request, res: express.Response, ne
38 const videoObject = video.toActivityPubObject() 38 const videoObject = video.toActivityPubObject()
39 39
40 // This is a shared video 40 // This is a shared video
41 const videoChannel = video.VideoChannel
41 if (video.VideoShares !== undefined && video.VideoShares.length !== 0) { 42 if (video.VideoShares !== undefined && video.VideoShares.length !== 0) {
42 const addActivity = await addActivityData(video.url, video.VideoChannel.Account, video, video.VideoChannel.url, videoObject) 43 const addActivity = await addActivityData(video.url, videoChannel.Account, video, videoChannel.url, videoObject, undefined)
43 44
44 const url = getAnnounceActivityPubUrl(video.url, account) 45 const url = getAnnounceActivityPubUrl(video.url, account)
45 const announceActivity = await announceActivityData(url, account, addActivity) 46 const announceActivity = await announceActivityData(url, account, addActivity, undefined)
46 47
47 activities.push(announceActivity) 48 activities.push(announceActivity)
48 } else { 49 } else {
49 const addActivity = await addActivityData(video.url, account, video, video.VideoChannel.url, videoObject) 50 const addActivity = await addActivityData(video.url, account, video, videoChannel.url, videoObject, undefined)
50 51
51 activities.push(addActivity) 52 activities.push(addActivity)
52 } 53 }