diff options
Diffstat (limited to 'server/lib/views/shared/video-views.ts')
-rw-r--r-- | server/lib/views/shared/video-views.ts | 7 |
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 @@ | |||
1 | import { logger, loggerTagsFactory } from '@server/helpers/logger' | 1 | import { logger, loggerTagsFactory } from '@server/helpers/logger' |
2 | import { sendView } from '@server/lib/activitypub/send/send-view' | ||
3 | import { getServerActor } from '@server/models/application/application' | ||
2 | import { MVideo } from '@server/types/models' | 4 | import { MVideo } from '@server/types/models' |
5 | import { buildUUID } from '@shared/extra-utils' | ||
3 | import { Redis } from '../../redis' | 6 | import { Redis } from '../../redis' |
4 | 7 | ||
5 | const lTags = loggerTagsFactory('views') | 8 | const 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 | ||