diff options
Diffstat (limited to 'server/lib/activitypub/playlist.ts')
-rw-r--r-- | server/lib/activitypub/playlist.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/activitypub/playlist.ts b/server/lib/activitypub/playlist.ts index c52b715ef..c1d932a68 100644 --- a/server/lib/activitypub/playlist.ts +++ b/server/lib/activitypub/playlist.ts | |||
@@ -20,7 +20,9 @@ import { MAccountDefault, MAccountId, MVideoId } from '../../typings/models' | |||
20 | import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../typings/models/video/video-playlist' | 20 | import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../typings/models/video/video-playlist' |
21 | 21 | ||
22 | function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { | 22 | function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { |
23 | const privacy = to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 ? VideoPlaylistPrivacy.PUBLIC : VideoPlaylistPrivacy.UNLISTED | 23 | const privacy = to.includes(ACTIVITY_PUB.PUBLIC) |
24 | ? VideoPlaylistPrivacy.PUBLIC | ||
25 | : VideoPlaylistPrivacy.UNLISTED | ||
24 | 26 | ||
25 | return { | 27 | return { |
26 | name: playlistObject.name, | 28 | name: playlistObject.name, |
@@ -205,7 +207,7 @@ async function fetchRemoteVideoPlaylist (playlistUrl: string): Promise<{ statusC | |||
205 | 207 | ||
206 | logger.info('Fetching remote playlist %s.', playlistUrl) | 208 | logger.info('Fetching remote playlist %s.', playlistUrl) |
207 | 209 | ||
208 | const { response, body } = await doRequest(options) | 210 | const { response, body } = await doRequest<any>(options) |
209 | 211 | ||
210 | if (isPlaylistObjectValid(body) === false || checkUrlsSameHost(body.id, playlistUrl) !== true) { | 212 | if (isPlaylistObjectValid(body) === false || checkUrlsSameHost(body.id, playlistUrl) !== true) { |
211 | logger.debug('Remote video playlist JSON is not valid.', { body }) | 213 | logger.debug('Remote video playlist JSON is not valid.', { body }) |