From 85cfe29be65b34ae816bcecf5413c2655a3b76f3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 13 Jun 2022 13:55:05 +0200 Subject: [PATCH] Fix socket io lazy loading --- client/src/app/core/notification/peertube-socket.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/app/core/notification/peertube-socket.service.ts b/client/src/app/core/notification/peertube-socket.service.ts index 0db86d8e7..50a11e948 100644 --- a/client/src/app/core/notification/peertube-socket.service.ts +++ b/client/src/app/core/notification/peertube-socket.service.ts @@ -1,5 +1,5 @@ import { Subject } from 'rxjs' -import { io, Socket } from 'socket.io-client' +import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client' import { Injectable } from '@angular/core' import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' import { environment } from '../../../environments/environment' @@ -9,7 +9,7 @@ export type NotificationEvent = 'new' | 'read' | 'read-all' @Injectable() export class PeerTubeSocket { - private io: typeof io + private io: (uri: string, opts?: Partial) => Socket private notificationSubject = new Subject<{ type: NotificationEvent, notification?: UserNotificationServer }>() private liveVideosSubject = new Subject<{ type: LiveVideoEventType, payload: LiveVideoEventPayload }>() -- 2.41.0