aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/videos.ts')
-rw-r--r--server/lib/activitypub/videos.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 04f0bfc23..b15d5da1c 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -76,6 +76,7 @@ import { sendCreateVideo, sendUpdateVideo } from './send'
76import { addVideoShares, shareVideoByServerAndChannel } from './share' 76import { addVideoShares, shareVideoByServerAndChannel } from './share'
77import { addVideoComments } from './video-comments' 77import { addVideoComments } from './video-comments'
78import { createRates } from './video-rates' 78import { createRates } from './video-rates'
79import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
79 80
80async function federateVideoIfNeeded (videoArg: MVideoAPWithoutCaption, isNewVideo: boolean, transaction?: sequelize.Transaction) { 81async function federateVideoIfNeeded (videoArg: MVideoAPWithoutCaption, isNewVideo: boolean, transaction?: sequelize.Transaction) {
81 const video = videoArg as MVideoAP 82 const video = videoArg as MVideoAP
@@ -488,7 +489,7 @@ async function refreshVideoIfNeeded (options: {
488 489
489 try { 490 try {
490 const { response, videoObject } = await fetchRemoteVideo(video.url) 491 const { response, videoObject } = await fetchRemoteVideo(video.url)
491 if (response.statusCode === 404) { 492 if (response.statusCode === HttpStatusCode.NOT_FOUND_404) {
492 logger.info('Cannot refresh remote video %s: video does not exist anymore. Deleting it.', video.url) 493 logger.info('Cannot refresh remote video %s: video does not exist anymore. Deleting it.', video.url)
493 494
494 // Video does not exist anymore 495 // Video does not exist anymore