aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/video-comments.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-02 15:47:05 +0200
committerChocobozzz <me@florianbigard.com>2021-06-02 16:57:53 +0200
commit304a84d59c3a800b7f7aef48cf55f307534c0926 (patch)
treee099aefd76aa8ee5aacef7ddfc59d79111fe474b /server/lib/activitypub/video-comments.ts
parentc56faf0d9453490737f283b29a203bb1ca632b95 (diff)
downloadPeerTube-304a84d59c3a800b7f7aef48cf55f307534c0926.tar.gz
PeerTube-304a84d59c3a800b7f7aef48cf55f307534c0926.tar.zst
PeerTube-304a84d59c3a800b7f7aef48cf55f307534c0926.zip
Refactor getOrCreateAPVideo
Diffstat (limited to 'server/lib/activitypub/video-comments.ts')
-rw-r--r--server/lib/activitypub/video-comments.ts4
1 files changed, 2 insertions, 2 deletions
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
7import { VideoCommentModel } from '../../models/video/video-comment' 7import { VideoCommentModel } from '../../models/video/video-comment'
8import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../types/models/video' 8import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../types/models/video'
9import { getOrCreateActorAndServerAndModel } from './actor' 9import { getOrCreateActorAndServerAndModel } from './actor'
10import { getOrCreateVideoAndAccountAndChannel } from './videos' 10import { getOrCreateAPVideo } from './videos'
11 11
12type ResolveThreadParams = { 12type ResolveThreadParams = {
13 url: string 13 url: string
@@ -89,7 +89,7 @@ async function tryResolveThreadFromVideo (params: ResolveThreadParams) {
89 // Maybe it's a reply to a video? 89 // Maybe it's a reply to a video?
90 // If yes, it's done: we resolved all the thread 90 // If yes, it's done: we resolved all the thread
91 const syncParam = { likes: true, dislikes: true, shares: true, comments: false, thumbnail: true, refreshVideo: false } 91 const syncParam = { likes: true, dislikes: true, shares: true, comments: false, thumbnail: true, refreshVideo: false }
92 const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: url, syncParam }) 92 const { video } = await getOrCreateAPVideo({ videoObject: url, syncParam })
93 93
94 if (video.isOwned() && !video.hasPrivacyForFederation()) { 94 if (video.isOwned() && !video.hasPrivacyForFederation()) {
95 throw new Error('Cannot resolve thread of video with privacy that is not compatible with federation') 95 throw new Error('Cannot resolve thread of video with privacy that is not compatible with federation')