Skip to content

Commit

Permalink
feat: encode authBody before sending
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid authored Jul 3, 2023
1 parent 1c70a53 commit e382c03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export class Live extends NiceEventEmitter {

this.on('open', () => {
if (authBody) {
this.send(authBody)
const buf = encoder('join', inflates, authBody)
this.send(buf)
} else {
const hi: { uid: number, roomid: number, protover: number, platform: string, clientver: string, type: number, key?: string } = { uid: 0, roomid, protover, platform: 'web', clientver: '2.0.11', type: 2 }
if (key) {
Expand Down

0 comments on commit e382c03

Please sign in to comment.