1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

esModuleInterop to true

This commit is contained in:
Chocobozzz 2021-08-27 14:32:44 +02:00
parent 40e7ed0714
commit 41fb13c330
No known key found for this signature in database
GPG key ID: 583A612D890159BE
208 changed files with 444 additions and 425 deletions

View file

@ -1,23 +1,23 @@
import { Server } from 'http'
import * as SocketIO from 'socket.io'
import { Server as HTTPServer } from 'http'
import { Namespace, Server as SocketServer, Socket } from 'socket.io'
import { isIdValid } from '@server/helpers/custom-validators/misc'
import { MVideo } from '@server/types/models'
import { UserNotificationModelForApi } from '@server/types/models/user'
import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models'
import { logger } from '../helpers/logger'
import { authenticateSocket } from '../middlewares'
import { isIdValid } from '@server/helpers/custom-validators/misc'
class PeerTubeSocket {
private static instance: PeerTubeSocket
private userNotificationSockets: { [ userId: number ]: SocketIO.Socket[] } = {}
private liveVideosNamespace: SocketIO.Namespace
private userNotificationSockets: { [ userId: number ]: Socket[] } = {}
private liveVideosNamespace: Namespace
private constructor () {}
init (server: Server) {
const io = new SocketIO.Server(server)
init (server: HTTPServer) {
const io = new SocketServer(server)
io.of('/user-notifications')
.use(authenticateSocket)