mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Revert "temporary client compatibility workaround."
This commit is contained in:
parent
f67ceae472
commit
07b5ba0977
@ -72,12 +72,11 @@ export class NekoWebSocket extends EventEmitter<NekoWebSocketEvents> {
|
||||
}
|
||||
|
||||
this._log.debug(`sending event '${event}' ${payload ? `with payload: ` : ''}`, payload)
|
||||
this._ws!.send(JSON.stringify({ event, payload, ...payload }))
|
||||
this._ws!.send(JSON.stringify({ event, payload }))
|
||||
}
|
||||
|
||||
private onMessage(e: MessageEvent) {
|
||||
const { event, ...data } = JSON.parse(e.data)
|
||||
const payload = 'payload' in data ? data.payload : data
|
||||
const { event, payload } = JSON.parse(e.data)
|
||||
|
||||
this._log.debug(`received websocket event ${event} ${payload ? `with payload: ` : ''}`, payload)
|
||||
this.emit('message', event, payload)
|
||||
|
Loading…
Reference in New Issue
Block a user