From bf1f650817dadfd5eeee9e5e0b6b6938c136e25d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 22 Dec 2017 10:50:07 +0100 Subject: Add comments controller --- server/lib/activitypub/url.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'server/lib/activitypub/url.ts') 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' import { ActorFollowModel } from '../../models/activitypub/actor-follow' import { VideoModel } from '../../models/video/video' import { VideoAbuseModel } from '../../models/video/video-abuse' +import { VideoCommentModel } from '../../models/video/video-comment' function getVideoActivityPubUrl (video: VideoModel) { return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid } -function getVideoChannelActivityPubUrl (videoChannelUUID: string) { - return CONFIG.WEBSERVER.URL + '/video-channels/' + videoChannelUUID +function getVideoCommentActivityPubUrl (video: VideoModel, videoComment: VideoCommentModel) { + return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid + '#comment-' + videoComment.id } -function getApplicationActivityPubUrl () { - return CONFIG.WEBSERVER.URL + '/application/peertube' +function getVideoChannelActivityPubUrl (videoChannelUUID: string) { + return CONFIG.WEBSERVER.URL + '/video-channels/' + videoChannelUUID } function getAccountActivityPubUrl (accountName: string) { @@ -63,7 +64,6 @@ function getUndoActivityPubUrl (originalUrl: string) { } export { - getApplicationActivityPubUrl, getVideoActivityPubUrl, getVideoChannelActivityPubUrl, getAccountActivityPubUrl, @@ -75,5 +75,6 @@ export { getUndoActivityPubUrl, getVideoViewActivityPubUrl, getVideoLikeActivityPubUrl, - getVideoDislikeActivityPubUrl + getVideoDislikeActivityPubUrl, + getVideoCommentActivityPubUrl } -- cgit v1.2.3