mirror of
https://github.com/immich-app/immich.git
synced 2025-12-29 17:25:00 +03:00
fix(cli): ignore web socket when unavailable and skip metadata init (#4748)
This commit is contained in:
@@ -10,7 +10,7 @@ export class CommunicationRepository implements OnGatewayConnection, OnGatewayDi
|
||||
|
||||
constructor(private authService: AuthService) {}
|
||||
|
||||
@WebSocketServer() server!: Server;
|
||||
@WebSocketServer() server?: Server;
|
||||
|
||||
addEventListener(event: 'connect', callback: Callback) {
|
||||
this.onConnectCallbacks.push(callback);
|
||||
@@ -37,10 +37,10 @@ export class CommunicationRepository implements OnGatewayConnection, OnGatewayDi
|
||||
}
|
||||
|
||||
send(event: CommunicationEvent, userId: string, data: any) {
|
||||
this.server.to(userId).emit(event, data);
|
||||
this.server?.to(userId).emit(event, data);
|
||||
}
|
||||
|
||||
broadcast(event: CommunicationEvent, data: any) {
|
||||
this.server.emit(event, data);
|
||||
this.server?.emit(event, data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user