From 9fb3abfdac5c4bffe9992a457e5210d3aa743952 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 12 Jan 2018 15:35:30 +0100 Subject: Fix communication with mastodon --- server/lib/activitypub/videos.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib') diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 708f4a897..5b429709f 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -122,10 +122,10 @@ function videoFileActivityUrlToDBAttributes (videoCreated: VideoModel, videoObje return u.mimeType === 'application/x-bittorrent;x-scheme-handler/magnet' && u.width === fileUrl.width }) - if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.url) + if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href) - const parsed = magnetUtil.decode(magnet.url) - if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) throw new Error('Cannot parse magnet URI ' + magnet.url) + const parsed = magnetUtil.decode(magnet.href) + if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) throw new Error('Cannot parse magnet URI ' + magnet.href) const attribute = { extname: VIDEO_MIMETYPE_EXT[ fileUrl.mimeType ], -- cgit v1.2.3