aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/url.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-06 08:50:43 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commitac907dc7c158056e9b6a5cb58acd27df5c7c2670 (patch)
treef9d8bff22e0543a305c64e1a1808c0df6d512f1e /server/lib/activitypub/url.ts
parentdfbcefc20dc64f0814b1f2e8e782a4ea1bd24db2 (diff)
downloadPeerTube-ac907dc7c158056e9b6a5cb58acd27df5c7c2670.tar.gz
PeerTube-ac907dc7c158056e9b6a5cb58acd27df5c7c2670.tar.zst
PeerTube-ac907dc7c158056e9b6a5cb58acd27df5c7c2670.zip
Improve viewer counter
More precise, avoid weird decrease, reuse an id to federate viewers
Diffstat (limited to 'server/lib/activitypub/url.ts')
-rw-r--r--server/lib/activitypub/url.ts4
1 files changed, 2 insertions, 2 deletions
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) {
56 return WEBSERVER.URL + '/admin/abuses/' + abuse.id 56 return WEBSERVER.URL + '/admin/abuses/' + abuse.id
57} 57}
58 58
59function getLocalVideoViewActivityPubUrl (byActor: MActorUrl, video: MVideoId) { 59function getLocalVideoViewActivityPubUrl (byActor: MActorUrl, video: MVideoId, viewerIdentifier: string) {
60 return byActor.url + '/views/videos/' + video.id + '/' + new Date().toISOString() 60 return byActor.url + '/views/videos/' + video.id + '/' + viewerIdentifier
61} 61}
62 62
63function getLocalVideoViewerActivityPubUrl (stats: MLocalVideoViewer) { 63function getLocalVideoViewerActivityPubUrl (stats: MLocalVideoViewer) {