From: Chocobozzz Date: Fri, 28 Jul 2023 14:35:27 +0000 (+0200) Subject: Remove deprecated "views" from live video event X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=257df4cb56b5f593d9509efc4c3f095c9d601a43;p=github%2FChocobozzz%2FPeerTube.git Remove deprecated "views" from live video event --- 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 @@ import { Server as HTTPServer } from 'http' import { Namespace, Server as SocketServer, Socket } from 'socket.io' import { isIdValid } from '@server/helpers/custom-validators/misc' +import { Debounce } from '@server/helpers/debounce' import { MVideo, MVideoImmutable } from '@server/types/models' import { MRunner } from '@server/types/models/runners' import { UserNotificationModelForApi } from '@server/types/models/user' import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models' import { logger } from '../helpers/logger' import { authenticateRunnerSocket, authenticateSocket } from '../middlewares' -import { Debounce } from '@server/helpers/debounce' class PeerTubeSocket { @@ -98,7 +98,7 @@ class PeerTubeSocket { } sendVideoViewsUpdate (video: MVideoImmutable, numViewers: number) { - const data: LiveVideoEventPayload = { viewers: numViewers, views: numViewers } + const data: LiveVideoEventPayload = { viewers: numViewers } const type: LiveVideoEventType = 'views-change' logger.debug('Sending video live views update notification of %s.', video.url, { viewers: numViewers }) diff --git a/shared/models/videos/live/live-video-event-payload.model.ts b/shared/models/videos/live/live-video-event-payload.model.ts index 1a9ac512c..646856ac3 100644 --- a/shared/models/videos/live/live-video-event-payload.model.ts +++ b/shared/models/videos/live/live-video-event-payload.model.ts @@ -3,8 +3,5 @@ import { VideoState } from '../video-state.enum' export interface LiveVideoEventPayload { state?: VideoState - // FIXME: deprecated in 4.0 in favour of viewers - views?: number - viewers?: number }