aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/views/shared/video-views.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/views/shared/video-views.ts')
-rw-r--r--server/lib/views/shared/video-views.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/views/shared/video-views.ts b/server/lib/views/shared/video-views.ts
index 19250f993..275f7a014 100644
--- a/server/lib/views/shared/video-views.ts
+++ b/server/lib/views/shared/video-views.ts
@@ -1,5 +1,8 @@
1import { logger, loggerTagsFactory } from '@server/helpers/logger' 1import { logger, loggerTagsFactory } from '@server/helpers/logger'
2import { sendView } from '@server/lib/activitypub/send/send-view'
3import { getServerActor } from '@server/models/application/application'
2import { MVideo } from '@server/types/models' 4import { MVideo } from '@server/types/models'
5import { buildUUID } from '@shared/extra-utils'
3import { Redis } from '../../redis' 6import { Redis } from '../../redis'
4 7
5const lTags = loggerTagsFactory('views') 8const lTags = loggerTagsFactory('views')
@@ -24,6 +27,8 @@ export class VideoViews {
24 27
25 await this.addView(video) 28 await this.addView(video)
26 29
30 await sendView({ byActor: await getServerActor(), video, type: 'view', viewerIdentifier: buildUUID() })
31
27 return true 32 return true
28 } 33 }
29 34
@@ -39,6 +44,8 @@ export class VideoViews {
39 return true 44 return true
40 } 45 }
41 46
47 // ---------------------------------------------------------------------------
48
42 private async addView (video: MVideo) { 49 private async addView (video: MVideo) {
43 const promises: Promise<any>[] = [] 50 const promises: Promise<any>[] = []
44 51