diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-28 16:35:27 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-28 16:35:57 +0200 |
commit | 257df4cb56b5f593d9509efc4c3f095c9d601a43 (patch) | |
tree | b761b7081b1a5c2ff982c90598f2930bb2ed2716 /server | |
parent | 982edf32ae436424e9b1ebf7f13696e4871ce202 (diff) | |
download | PeerTube-257df4cb56b5f593d9509efc4c3f095c9d601a43.tar.gz PeerTube-257df4cb56b5f593d9509efc4c3f095c9d601a43.tar.zst PeerTube-257df4cb56b5f593d9509efc4c3f095c9d601a43.zip |
Remove deprecated "views" from live video event
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/peertube-socket.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/peertube-socket.ts b/server/lib/peertube-socket.ts index ded7e9743..3e41a2def 100644 --- a/server/lib/peertube-socket.ts +++ b/server/lib/peertube-socket.ts | |||
@@ -1,13 +1,13 @@ | |||
1 | import { Server as HTTPServer } from 'http' | 1 | import { Server as HTTPServer } from 'http' |
2 | import { Namespace, Server as SocketServer, Socket } from 'socket.io' | 2 | import { Namespace, Server as SocketServer, Socket } from 'socket.io' |
3 | import { isIdValid } from '@server/helpers/custom-validators/misc' | 3 | import { isIdValid } from '@server/helpers/custom-validators/misc' |
4 | import { Debounce } from '@server/helpers/debounce' | ||
4 | import { MVideo, MVideoImmutable } from '@server/types/models' | 5 | import { MVideo, MVideoImmutable } from '@server/types/models' |
5 | import { MRunner } from '@server/types/models/runners' | 6 | import { MRunner } from '@server/types/models/runners' |
6 | import { UserNotificationModelForApi } from '@server/types/models/user' | 7 | import { UserNotificationModelForApi } from '@server/types/models/user' |
7 | import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models' | 8 | import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models' |
8 | import { logger } from '../helpers/logger' | 9 | import { logger } from '../helpers/logger' |
9 | import { authenticateRunnerSocket, authenticateSocket } from '../middlewares' | 10 | import { authenticateRunnerSocket, authenticateSocket } from '../middlewares' |
10 | import { Debounce } from '@server/helpers/debounce' | ||
11 | 11 | ||
12 | class PeerTubeSocket { | 12 | class PeerTubeSocket { |
13 | 13 | ||
@@ -98,7 +98,7 @@ class PeerTubeSocket { | |||
98 | } | 98 | } |
99 | 99 | ||
100 | sendVideoViewsUpdate (video: MVideoImmutable, numViewers: number) { | 100 | sendVideoViewsUpdate (video: MVideoImmutable, numViewers: number) { |
101 | const data: LiveVideoEventPayload = { viewers: numViewers, views: numViewers } | 101 | const data: LiveVideoEventPayload = { viewers: numViewers } |
102 | const type: LiveVideoEventType = 'views-change' | 102 | const type: LiveVideoEventType = 'views-change' |
103 | 103 | ||
104 | logger.debug('Sending video live views update notification of %s.', video.url, { viewers: numViewers }) | 104 | logger.debug('Sending video live views update notification of %s.', video.url, { viewers: numViewers }) |