]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/videos.ts
Add comments federation tests
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / videos.ts
index fab43757a443a1fa713fd9e722ed4b0e2700d276..ded854ee135034c8110d6915e3b73d07eff1c0fe 100644 (file)
@@ -17,12 +17,12 @@ import {
   sendUndoLikeToVideoFollowers
 } from './send'
 
-function fetchRemoteVideoPreview (video: VideoModel) {
+function fetchRemoteVideoPreview (video: VideoModel, reject: Function) {
   // FIXME: use url
   const host = video.VideoChannel.Account.Actor.Server.host
   const path = join(STATIC_PATHS.PREVIEWS, video.getPreviewName())
 
-  return request.get(REMOTE_SCHEME.HTTP + '://' + host + path)
+  return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => reject(err))
 }
 
 async function fetchRemoteVideoDescription (video: VideoModel) {