diff options
Diffstat (limited to 'server/lib/activitypub/url.ts')
-rw-r--r-- | server/lib/activitypub/url.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index 401b83fc2..01950a13b 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { CONFIG } from '../../initializers' | 1 | import { WEBSERVER } from '../../initializers' |
2 | import { ActorModel } from '../../models/activitypub/actor' | 2 | import { ActorModel } from '../../models/activitypub/actor' |
3 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' | 3 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' |
4 | import { VideoModel } from '../../models/video/video' | 4 | import { VideoModel } from '../../models/video/video' |
@@ -9,41 +9,41 @@ import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming- | |||
9 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 9 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
10 | 10 | ||
11 | function getVideoActivityPubUrl (video: VideoModel) { | 11 | function getVideoActivityPubUrl (video: VideoModel) { |
12 | return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid | 12 | return WEBSERVER.URL + '/videos/watch/' + video.uuid |
13 | } | 13 | } |
14 | 14 | ||
15 | function getVideoPlaylistActivityPubUrl (videoPlaylist: VideoPlaylistModel) { | 15 | function getVideoPlaylistActivityPubUrl (videoPlaylist: VideoPlaylistModel) { |
16 | return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid | 16 | return WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid |
17 | } | 17 | } |
18 | 18 | ||
19 | function getVideoPlaylistElementActivityPubUrl (videoPlaylist: VideoPlaylistModel, video: VideoModel) { | 19 | function getVideoPlaylistElementActivityPubUrl (videoPlaylist: VideoPlaylistModel, video: VideoModel) { |
20 | return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid + '/' + video.uuid | 20 | return WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid + '/' + video.uuid |
21 | } | 21 | } |
22 | 22 | ||
23 | function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) { | 23 | function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) { |
24 | const suffixFPS = videoFile.fps && videoFile.fps !== -1 ? '-' + videoFile.fps : '' | 24 | const suffixFPS = videoFile.fps && videoFile.fps !== -1 ? '-' + videoFile.fps : '' |
25 | 25 | ||
26 | return `${CONFIG.WEBSERVER.URL}/redundancy/videos/${videoFile.Video.uuid}/${videoFile.resolution}${suffixFPS}` | 26 | return `${WEBSERVER.URL}/redundancy/videos/${videoFile.Video.uuid}/${videoFile.resolution}${suffixFPS}` |
27 | } | 27 | } |
28 | 28 | ||
29 | function getVideoCacheStreamingPlaylistActivityPubUrl (video: VideoModel, playlist: VideoStreamingPlaylistModel) { | 29 | function getVideoCacheStreamingPlaylistActivityPubUrl (video: VideoModel, playlist: VideoStreamingPlaylistModel) { |
30 | return `${CONFIG.WEBSERVER.URL}/redundancy/streaming-playlists/${playlist.getStringType()}/${video.uuid}` | 30 | return `${WEBSERVER.URL}/redundancy/streaming-playlists/${playlist.getStringType()}/${video.uuid}` |
31 | } | 31 | } |
32 | 32 | ||
33 | function getVideoCommentActivityPubUrl (video: VideoModel, videoComment: VideoCommentModel) { | 33 | function getVideoCommentActivityPubUrl (video: VideoModel, videoComment: VideoCommentModel) { |
34 | return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid + '/comments/' + videoComment.id | 34 | return WEBSERVER.URL + '/videos/watch/' + video.uuid + '/comments/' + videoComment.id |
35 | } | 35 | } |
36 | 36 | ||
37 | function getVideoChannelActivityPubUrl (videoChannelName: string) { | 37 | function getVideoChannelActivityPubUrl (videoChannelName: string) { |
38 | return CONFIG.WEBSERVER.URL + '/video-channels/' + videoChannelName | 38 | return WEBSERVER.URL + '/video-channels/' + videoChannelName |
39 | } | 39 | } |
40 | 40 | ||
41 | function getAccountActivityPubUrl (accountName: string) { | 41 | function getAccountActivityPubUrl (accountName: string) { |
42 | return CONFIG.WEBSERVER.URL + '/accounts/' + accountName | 42 | return WEBSERVER.URL + '/accounts/' + accountName |
43 | } | 43 | } |
44 | 44 | ||
45 | function getVideoAbuseActivityPubUrl (videoAbuse: VideoAbuseModel) { | 45 | function getVideoAbuseActivityPubUrl (videoAbuse: VideoAbuseModel) { |
46 | return CONFIG.WEBSERVER.URL + '/admin/video-abuses/' + videoAbuse.id | 46 | return WEBSERVER.URL + '/admin/video-abuses/' + videoAbuse.id |
47 | } | 47 | } |
48 | 48 | ||
49 | function getVideoViewActivityPubUrl (byActor: ActorModel, video: VideoModel) { | 49 | function getVideoViewActivityPubUrl (byActor: ActorModel, video: VideoModel) { |