diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-12 15:35:30 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-12 15:35:30 +0100 |
commit | 9fb3abfdac5c4bffe9992a457e5210d3aa743952 (patch) | |
tree | b2feaec75e890ea842dcb52b9760863cd64481fb /server/lib | |
parent | bd377530836474fa2a4404bd3e8bdd15f1b9ccc0 (diff) | |
download | PeerTube-9fb3abfdac5c4bffe9992a457e5210d3aa743952.tar.gz PeerTube-9fb3abfdac5c4bffe9992a457e5210d3aa743952.tar.zst PeerTube-9fb3abfdac5c4bffe9992a457e5210d3aa743952.zip |
Fix communication with mastodon
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/videos.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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 | |||
122 | return u.mimeType === 'application/x-bittorrent;x-scheme-handler/magnet' && u.width === fileUrl.width | 122 | return u.mimeType === 'application/x-bittorrent;x-scheme-handler/magnet' && u.width === fileUrl.width |
123 | }) | 123 | }) |
124 | 124 | ||
125 | if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.url) | 125 | if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href) |
126 | 126 | ||
127 | const parsed = magnetUtil.decode(magnet.url) | 127 | const parsed = magnetUtil.decode(magnet.href) |
128 | if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) throw new Error('Cannot parse magnet URI ' + magnet.url) | 128 | if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) throw new Error('Cannot parse magnet URI ' + magnet.href) |
129 | 129 | ||
130 | const attribute = { | 130 | const attribute = { |
131 | extname: VIDEO_MIMETYPE_EXT[ fileUrl.mimeType ], | 131 | extname: VIDEO_MIMETYPE_EXT[ fileUrl.mimeType ], |