diff options
Diffstat (limited to 'server/controllers/activitypub/client.ts')
-rw-r--r-- | server/controllers/activitypub/client.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 1c780783c..ea8e25f68 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -123,11 +123,11 @@ async function accountFollowingController (req: express.Request, res: express.Re | |||
123 | async function videoController (req: express.Request, res: express.Response, next: express.NextFunction) { | 123 | async function videoController (req: express.Request, res: express.Response, next: express.NextFunction) { |
124 | const video: VideoModel = res.locals.video | 124 | const video: VideoModel = res.locals.video |
125 | 125 | ||
126 | const audience = await getAudience(video.VideoChannel.Account.Actor, undefined, video.privacy === VideoPrivacy.PUBLIC) | 126 | const audience = getAudience(video.VideoChannel.Account.Actor, video.privacy === VideoPrivacy.PUBLIC) |
127 | const videoObject = audiencify(video.toActivityPubObject(), audience) | 127 | const videoObject = audiencify(video.toActivityPubObject(), audience) |
128 | 128 | ||
129 | if (req.path.endsWith('/activity')) { | 129 | if (req.path.endsWith('/activity')) { |
130 | const data = await createActivityData(video.url, video.VideoChannel.Account.Actor, videoObject, undefined, audience) | 130 | const data = createActivityData(video.url, video.VideoChannel.Account.Actor, videoObject, audience) |
131 | return activityPubResponse(activityPubContextify(data), res) | 131 | return activityPubResponse(activityPubContextify(data), res) |
132 | } | 132 | } |
133 | 133 | ||
@@ -210,12 +210,12 @@ async function videoCommentController (req: express.Request, res: express.Respon | |||
210 | 210 | ||
211 | const threadParentComments = await VideoCommentModel.listThreadParentComments(videoComment, undefined) | 211 | const threadParentComments = await VideoCommentModel.listThreadParentComments(videoComment, undefined) |
212 | const isPublic = true // Comments are always public | 212 | const isPublic = true // Comments are always public |
213 | const audience = await getAudience(videoComment.Account.Actor, undefined, isPublic) | 213 | const audience = getAudience(videoComment.Account.Actor, isPublic) |
214 | 214 | ||
215 | const videoCommentObject = audiencify(videoComment.toActivityPubObject(threadParentComments), audience) | 215 | const videoCommentObject = audiencify(videoComment.toActivityPubObject(threadParentComments), audience) |
216 | 216 | ||
217 | if (req.path.endsWith('/activity')) { | 217 | if (req.path.endsWith('/activity')) { |
218 | const data = await createActivityData(videoComment.url, videoComment.Account.Actor, videoCommentObject, undefined, audience) | 218 | const data = createActivityData(videoComment.url, videoComment.Account.Actor, videoCommentObject, audience) |
219 | return activityPubResponse(activityPubContextify(data), res) | 219 | return activityPubResponse(activityPubContextify(data), res) |
220 | } | 220 | } |
221 | 221 | ||