aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-28 16:35:27 +0200
committerChocobozzz <me@florianbigard.com>2023-07-28 16:35:57 +0200
commit257df4cb56b5f593d9509efc4c3f095c9d601a43 (patch)
treeb761b7081b1a5c2ff982c90598f2930bb2ed2716 /server
parent982edf32ae436424e9b1ebf7f13696e4871ce202 (diff)
downloadPeerTube-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.ts4
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 @@
1import { Server as HTTPServer } from 'http' 1import { Server as HTTPServer } from 'http'
2import { Namespace, Server as SocketServer, Socket } from 'socket.io' 2import { Namespace, Server as SocketServer, Socket } from 'socket.io'
3import { isIdValid } from '@server/helpers/custom-validators/misc' 3import { isIdValid } from '@server/helpers/custom-validators/misc'
4import { Debounce } from '@server/helpers/debounce'
4import { MVideo, MVideoImmutable } from '@server/types/models' 5import { MVideo, MVideoImmutable } from '@server/types/models'
5import { MRunner } from '@server/types/models/runners' 6import { MRunner } from '@server/types/models/runners'
6import { UserNotificationModelForApi } from '@server/types/models/user' 7import { UserNotificationModelForApi } from '@server/types/models/user'
7import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models' 8import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models'
8import { logger } from '../helpers/logger' 9import { logger } from '../helpers/logger'
9import { authenticateRunnerSocket, authenticateSocket } from '../middlewares' 10import { authenticateRunnerSocket, authenticateSocket } from '../middlewares'
10import { Debounce } from '@server/helpers/debounce'
11 11
12class PeerTubeSocket { 12class 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 })