aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/activitypub/client.ts3
-rw-r--r--server/controllers/activitypub/outbox.ts1
2 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index 166fc2a22..c47c61f52 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -4,6 +4,7 @@ import { activityPubCollectionPagination } from '@server/lib/activitypub/collect
4import { activityPubContextify } from '@server/lib/activitypub/context' 4import { activityPubContextify } from '@server/lib/activitypub/context'
5import { getServerActor } from '@server/models/application/application' 5import { getServerActor } from '@server/models/application/application'
6import { MAccountId, MActorId, MChannelId, MVideoId } from '@server/types/models' 6import { MAccountId, MActorId, MChannelId, MVideoId } from '@server/types/models'
7import { VideoCommentObject } from '@shared/models'
7import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' 8import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos'
8import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' 9import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model'
9import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' 10import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants'
@@ -353,7 +354,7 @@ async function videoCommentController (req: express.Request, res: express.Respon
353 videoCommentObject = audiencify(videoCommentObject, audience) 354 videoCommentObject = audiencify(videoCommentObject, audience)
354 355
355 if (req.path.endsWith('/activity')) { 356 if (req.path.endsWith('/activity')) {
356 const data = buildCreateActivity(videoComment.url, videoComment.Account.Actor, videoCommentObject, audience) 357 const data = buildCreateActivity(videoComment.url, videoComment.Account.Actor, videoCommentObject as VideoCommentObject, audience)
357 return activityPubResponse(activityPubContextify(data, 'Comment'), res) 358 return activityPubResponse(activityPubContextify(data, 'Comment'), res)
358 } 359 }
359 } 360 }
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts
index 681a5660c..4175cf276 100644
--- a/server/controllers/activitypub/outbox.ts
+++ b/server/controllers/activitypub/outbox.ts
@@ -63,6 +63,7 @@ async function buildActivities (actor: MActorLight, start: number, count: number
63 63
64 activities.push(announceActivity) 64 activities.push(announceActivity)
65 } else { 65 } else {
66 // FIXME: only use the video URL to reduce load. Breaks compat with PeerTube < 6.0.0
66 const videoObject = await video.toActivityPubObject() 67 const videoObject = await video.toActivityPubObject()
67 const createActivity = buildCreateActivity(video.url, byActor, videoObject, createActivityAudience) 68 const createActivity = buildCreateActivity(video.url, byActor, videoObject, createActivityAudience)
68 69