diff options
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r-- | server/controllers/activitypub/client.ts | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 453ced8bf..5ed0435ff 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -308,13 +308,16 @@ async function videoCommentController (req: express.Request, res: express.Respon | |||
308 | 308 | ||
309 | const threadParentComments = await VideoCommentModel.listThreadParentComments(videoComment, undefined) | 309 | const threadParentComments = await VideoCommentModel.listThreadParentComments(videoComment, undefined) |
310 | const isPublic = true // Comments are always public | 310 | const isPublic = true // Comments are always public |
311 | const audience = getAudience(videoComment.Account.Actor, isPublic) | 311 | let videoCommentObject = videoComment.toActivityPubObject(threadParentComments) |
312 | 312 | ||
313 | const videoCommentObject = audiencify(videoComment.toActivityPubObject(threadParentComments), audience) | 313 | if (videoComment.Account) { |
314 | const audience = getAudience(videoComment.Account.Actor, isPublic) | ||
315 | videoCommentObject = audiencify(videoCommentObject, audience) | ||
314 | 316 | ||
315 | if (req.path.endsWith('/activity')) { | 317 | if (req.path.endsWith('/activity')) { |
316 | const data = buildCreateActivity(videoComment.url, videoComment.Account.Actor, videoCommentObject, audience) | 318 | const data = buildCreateActivity(videoComment.url, videoComment.Account.Actor, videoCommentObject, audience) |
317 | return activityPubResponse(activityPubContextify(data), res) | 319 | return activityPubResponse(activityPubContextify(data), res) |
320 | } | ||
318 | } | 321 | } |
319 | 322 | ||
320 | return activityPubResponse(activityPubContextify(videoCommentObject), res) | 323 | return activityPubResponse(activityPubContextify(videoCommentObject), res) |