mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 08:21:50 -06:00
update client to include username when connecting to websocket.
This commit is contained in:
@@ -63,7 +63,9 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
|||||||
this[EVENT.CONNECTING]()
|
this[EVENT.CONNECTING]()
|
||||||
|
|
||||||
try {
|
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.emit('debug', `connecting to ${this._ws.url}`)
|
||||||
this._ws.onmessage = this.onMessage.bind(this)
|
this._ws.onmessage = this.onMessage.bind(this)
|
||||||
this._ws.onerror = () => this.onError.bind(this)
|
this._ws.onerror = () => this.onError.bind(this)
|
||||||
|
|||||||
Reference in New Issue
Block a user