X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fvideo-comments.ts;h=722147b69e15a4cea081c7f7b52ca17fc6e86ffb;hb=9777fe9eebe53debdf45091cab98f72a5987e05a;hp=e23e0c0e71f051f34e18fbed284bc795f6b37489;hpb=266131e0ca2f2622bbb15299212f00b1efa36867;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts index e23e0c0e7..722147b69 100644 --- a/server/lib/activitypub/video-comments.ts +++ b/server/lib/activitypub/video-comments.ts @@ -7,7 +7,7 @@ import { ACTIVITY_PUB, CRAWL_REQUEST_CONCURRENCY } from '../../initializers/cons import { VideoCommentModel } from '../../models/video/video-comment' import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../types/models/video' import { getOrCreateActorAndServerAndModel } from './actor' -import { getOrCreateVideoAndAccountAndChannel } from './videos' +import { getOrCreateAPVideo } from './videos' type ResolveThreadParams = { url: string @@ -89,7 +89,7 @@ async function tryResolveThreadFromVideo (params: ResolveThreadParams) { // Maybe it's a reply to a video? // If yes, it's done: we resolved all the thread const syncParam = { likes: true, dislikes: true, shares: true, comments: false, thumbnail: true, refreshVideo: false } - const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: url, syncParam }) + const { video } = await getOrCreateAPVideo({ videoObject: url, syncParam }) if (video.isOwned() && !video.hasPrivacyForFederation()) { throw new Error('Cannot resolve thread of video with privacy that is not compatible with federation')