update client to include username when connecting to websocket.
This commit is contained in:
parent
13f91477df
commit
daf8f79eb5
1 changed files with 3 additions and 1 deletions
|
|
@ -63,7 +63,9 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
|||
this[EVENT.CONNECTING]()
|
||||
|
||||
try {
|
||||
this._ws = new WebSocket(`${url}?password=${encodeURIComponent(password)}`)
|
||||
this._ws = new WebSocket(
|
||||
`${url}?password=${encodeURIComponent(password)}&username=${encodeURIComponent(displayname)}`,
|
||||
)
|
||||
this.emit('debug', `connecting to ${this._ws.url}`)
|
||||
this._ws.onmessage = this.onMessage.bind(this)
|
||||
this._ws.onerror = () => this.onError.bind(this)
|
||||
|
|
|
|||
Loading…
Reference in a new issue