Skip to content

Commit

Permalink
Use session-id from parsedAuthorization (#116)
Browse files Browse the repository at this point in the history
Co-authored-by: Nerixyz <[email protected]>
  • Loading branch information
Debanjan-San and Nerixyz authored Apr 23, 2024
1 parent d757a81 commit c9219ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/realtime/realtime.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export class RealtimeClient extends EventEmitter<ToEventFn<RealtimeClientEvents>
private constructConnection() {
const userAgent = this.ig.state.appUserAgent;
const deviceId = this.ig.state.phoneId;
const password = `sessionid=${this.ig.state.extractCookieValue('sessionid')}`;
const sessionid = this.ig.state.parsedAuthorization?.sessionid ?? this.ig.state.extractCookieValue('sessionid');
const password = `sessionid=${sessionid}`;
this.connection = new MQTToTConnection({
clientIdentifier: deviceId.substring(0, 20),
clientInfo: {
Expand Down

0 comments on commit c9219ad

Please sign in to comment.