renamed encoder variable #9
This commit is contained in:
parent
848976efe3
commit
08d164dc26
1 changed files with 4 additions and 4 deletions
|
@ -352,10 +352,10 @@ export class Room {
|
||||||
*/
|
*/
|
||||||
this._awarenessUpdateHandler = ({ added, updated, removed }, origin) => {
|
this._awarenessUpdateHandler = ({ added, updated, removed }, origin) => {
|
||||||
const changedClients = added.concat(updated).concat(removed)
|
const changedClients = added.concat(updated).concat(removed)
|
||||||
const encoder = encoding.createEncoder()
|
const encoderAwareness = encoding.createEncoder()
|
||||||
encoding.writeVarUint(encoder, messageAwareness)
|
encoding.writeVarUint(encoderAwareness, messageAwareness)
|
||||||
encoding.writeVarUint8Array(encoder, awarenessProtocol.encodeAwarenessUpdate(this.awareness, changedClients))
|
encoding.writeVarUint8Array(encoderAwareness, awarenessProtocol.encodeAwarenessUpdate(this.awareness, changedClients))
|
||||||
broadcastRoomMessage(this, encoding.toUint8Array(encoder))
|
broadcastRoomMessage(this, encoding.toUint8Array(encoderAwareness))
|
||||||
}
|
}
|
||||||
this.doc.on('update', this._docUpdateHandler)
|
this.doc.on('update', this._docUpdateHandler)
|
||||||
this.awareness.on('change', this._awarenessUpdateHandler)
|
this.awareness.on('change', this._awarenessUpdateHandler)
|
||||||
|
|
Loading…
Reference in a new issue