From f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Jan 2018 10:53:54 +0100 Subject: Don't show videos of remote instance after unfollow --- server/lib/activitypub/videos.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'server/lib/activitypub/videos.ts') diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 5b429709f..1d2d46cbc 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -20,17 +20,16 @@ import { VideoShareModel } from '../../models/video/video-share' import { getOrCreateActorAndServerAndModel } from './actor' 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()) + // We need to provide a callback, if no we could have an uncaught exception return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => { if (err) reject(err) }) } async function fetchRemoteVideoDescription (video: VideoModel) { - // FIXME: use url const host = video.VideoChannel.Account.Actor.Server.host const path = video.getDescriptionPath() const options = { -- cgit v1.2.3