aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-22 10:50:07 +0100
committerChocobozzz <me@florianbigard.com>2017-12-22 11:29:12 +0100
commitbf1f650817dadfd5eeee9e5e0b6b6938c136e25d (patch)
tree0f1dc95d87089be177ebe60740a55dd0c96b2414 /server/lib/activitypub
parent6d8524702874120a4667269a81a61e3c7c5e300d (diff)
downloadPeerTube-bf1f650817dadfd5eeee9e5e0b6b6938c136e25d.tar.gz
PeerTube-bf1f650817dadfd5eeee9e5e0b6b6938c136e25d.tar.zst
PeerTube-bf1f650817dadfd5eeee9e5e0b6b6938c136e25d.zip
Add comments controller
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/url.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts
index bb2d4d11e..729bb8dda 100644
--- a/server/lib/activitypub/url.ts
+++ b/server/lib/activitypub/url.ts
@@ -3,17 +3,18 @@ import { ActorModel } from '../../models/activitypub/actor'
3import { ActorFollowModel } from '../../models/activitypub/actor-follow' 3import { ActorFollowModel } from '../../models/activitypub/actor-follow'
4import { VideoModel } from '../../models/video/video' 4import { VideoModel } from '../../models/video/video'
5import { VideoAbuseModel } from '../../models/video/video-abuse' 5import { VideoAbuseModel } from '../../models/video/video-abuse'
6import { VideoCommentModel } from '../../models/video/video-comment'
6 7
7function getVideoActivityPubUrl (video: VideoModel) { 8function getVideoActivityPubUrl (video: VideoModel) {
8 return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid 9 return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
9} 10}
10 11
11function getVideoChannelActivityPubUrl (videoChannelUUID: string) { 12function getVideoCommentActivityPubUrl (video: VideoModel, videoComment: VideoCommentModel) {
12 return CONFIG.WEBSERVER.URL + '/video-channels/' + videoChannelUUID 13 return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid + '#comment-' + videoComment.id
13} 14}
14 15
15function getApplicationActivityPubUrl () { 16function getVideoChannelActivityPubUrl (videoChannelUUID: string) {
16 return CONFIG.WEBSERVER.URL + '/application/peertube' 17 return CONFIG.WEBSERVER.URL + '/video-channels/' + videoChannelUUID
17} 18}
18 19
19function getAccountActivityPubUrl (accountName: string) { 20function getAccountActivityPubUrl (accountName: string) {
@@ -63,7 +64,6 @@ function getUndoActivityPubUrl (originalUrl: string) {
63} 64}
64 65
65export { 66export {
66 getApplicationActivityPubUrl,
67 getVideoActivityPubUrl, 67 getVideoActivityPubUrl,
68 getVideoChannelActivityPubUrl, 68 getVideoChannelActivityPubUrl,
69 getAccountActivityPubUrl, 69 getAccountActivityPubUrl,
@@ -75,5 +75,6 @@ export {
75 getUndoActivityPubUrl, 75 getUndoActivityPubUrl,
76 getVideoViewActivityPubUrl, 76 getVideoViewActivityPubUrl,
77 getVideoLikeActivityPubUrl, 77 getVideoLikeActivityPubUrl,
78 getVideoDislikeActivityPubUrl 78 getVideoDislikeActivityPubUrl,
79 getVideoCommentActivityPubUrl
79} 80}