X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Furl.ts;h=ba3bf688d634d036f0877eab1d8c865f78da9a9e;hb=16f29007dc6ad9c539195d7a7c1cde45d626ce91;hp=3d5f0523cfd4bb17daeaa15ba6737838c903a74b;hpb=da854ddd502cd70685ef779c673b9e63757b8aa0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index 3d5f0523c..ba3bf688d 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts @@ -18,7 +18,7 @@ function getVideoChannelActivityPubUrl (videoChannelUUID: string) { } function getAccountActivityPubUrl (accountName: string) { - return CONFIG.WEBSERVER.URL + '/account/' + accountName + return CONFIG.WEBSERVER.URL + '/accounts/' + accountName } function getVideoAbuseActivityPubUrl (videoAbuse: VideoAbuseModel) { @@ -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 @@ -55,6 +71,10 @@ function getAnnounceActivityPubUrl (originalUrl: string, byActor: ActorModel) { return originalUrl + '/announces/' + byActor.id } +function getDeleteActivityPubUrl (originalUrl: string) { + return originalUrl + '/delete' +} + function getUpdateActivityPubUrl (originalUrl: string, updatedAt: string) { return originalUrl + '/updates/' + updatedAt } @@ -76,5 +96,10 @@ export { getVideoViewActivityPubUrl, getVideoLikeActivityPubUrl, getVideoDislikeActivityPubUrl, - getVideoCommentActivityPubUrl + getVideoCommentActivityPubUrl, + getDeleteActivityPubUrl, + getVideoSharesActivityPubUrl, + getVideoCommentsActivityPubUrl, + getVideoLikesActivityPubUrl, + getVideoDislikesActivityPubUrl }