X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Furl.ts;h=2f68f7a17017d8925d7454c47c176835bddb8d4f;hb=4d526901349b35bfac9811acc45854c65639cee3;hp=50be4fac9772716b7ff68252ba33f55113382794;hpb=7e98a7df7d04e19ba67163a86c7b876d78d76839;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index 50be4fac9..2f68f7a17 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts @@ -7,6 +7,7 @@ import { MActorId, MActorUrl, MCommentId, + MLocalVideoViewer, MVideoId, MVideoPlaylistElement, MVideoUrl, @@ -55,8 +56,12 @@ function getLocalAbuseActivityPubUrl (abuse: MAbuseId) { return WEBSERVER.URL + '/admin/abuses/' + abuse.id } -function getLocalVideoViewActivityPubUrl (byActor: MActorUrl, video: MVideoId) { - return byActor.url + '/views/videos/' + video.id + '/' + new Date().toISOString() +function getLocalVideoViewActivityPubUrl (byActor: MActorUrl, video: MVideoId, viewerIdentifier: string) { + return byActor.url + '/views/videos/' + video.id + '/' + viewerIdentifier +} + +function getLocalVideoViewerActivityPubUrl (stats: MLocalVideoViewer) { + return WEBSERVER.URL + '/videos/local-viewer/' + stats.uuid } function getVideoLikeActivityPubUrlByLocalActor (byActor: MActorUrl, video: MVideoId) { @@ -167,6 +172,7 @@ export { getLocalVideoCommentsActivityPubUrl, getLocalVideoLikesActivityPubUrl, getLocalVideoDislikesActivityPubUrl, + getLocalVideoViewerActivityPubUrl, getAbuseTargetUrl, checkUrlsSameHost,