|
|
|
@ -93,7 +93,9 @@ export class SocketRouteBuilder {
|
|
|
|
|
*/
|
|
|
|
|
async build(request: Request, ws: WebSocketBus): Promise<void> {
|
|
|
|
|
await this.handlers.promiseMap(handler => {
|
|
|
|
|
ws.subscribe(handler.eventClass, handler.handler.apply(request))
|
|
|
|
|
ws.subscribe(handler.eventClass, (event: StateEvent<JSONState>) => {
|
|
|
|
|
return handler.handler.apply(request)(event.getState())
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if ( this.connectionCallback ) {
|
|
|
|
|