add sendMessage.

This commit is contained in:
Miroslav Šedivý 2022-05-29 19:58:30 +02:00
parent e96e54f791
commit 9c20591e3d

View File

@ -427,6 +427,10 @@
this.connection.websocket.send(EVENT.SEND_BROADCAST, { subject, body })
}
public sendMessage(event: string, payload?: any) {
this.connection.websocket.send(event, payload)
}
public withApi<T>(c: new (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => T): T {
return new c(this.api.config)
}