From ac907dc7c158056e9b6a5cb58acd27df5c7c2670 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 Apr 2022 08:50:43 +0200 Subject: Improve viewer counter More precise, avoid weird decrease, reuse an id to federate viewers --- server/lib/activitypub/url.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib/activitypub/url.ts') diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index 8443fef4c..2f68f7a17 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts @@ -56,8 +56,8 @@ 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) { -- cgit v1.2.3