From 46531a0abdd5c860a1a8cdb4b636b9c55bfb115b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 29 Jan 2018 10:52:19 +0100 Subject: Add id to likes/dislikes/comments/shares collections --- server/lib/activitypub/url.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'server/lib') diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index 5705afbd6..ba3bf688d 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts @@ -37,6 +37,22 @@ function getVideoDislikeActivityPubUrl (byActor: ActorModel, video: VideoModel) return byActor.url + '/dislikes/' + video.id } +function getVideoSharesActivityPubUrl (video: VideoModel) { + return video.url + '/announces' +} + +function getVideoCommentsActivityPubUrl (video: VideoModel) { + return video.url + '/comments' +} + +function getVideoLikesActivityPubUrl (video: VideoModel) { + return video.url + '/likes' +} + +function getVideoDislikesActivityPubUrl (video: VideoModel) { + return video.url + '/dislikes' +} + function getActorFollowActivityPubUrl (actorFollow: ActorFollowModel) { const me = actorFollow.ActorFollower const following = actorFollow.ActorFollowing @@ -81,5 +97,9 @@ export { getVideoLikeActivityPubUrl, getVideoDislikeActivityPubUrl, getVideoCommentActivityPubUrl, - getDeleteActivityPubUrl + getDeleteActivityPubUrl, + getVideoSharesActivityPubUrl, + getVideoCommentsActivityPubUrl, + getVideoLikesActivityPubUrl, + getVideoDislikesActivityPubUrl } -- cgit v1.2.3