Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Use login key from ClientLogOnResponse, not ClientNewLoginKey
Browse files Browse the repository at this point in the history
The former replaced the latter on 17 Oct 2013, causing the first webLogOn attempt to always fail.
  • Loading branch information
seishun committed Sep 27, 2014
1 parent 9bb1a39 commit 00e01df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/handlers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ handlers[EMsg.ClientLogOnResponse] = function(data) {
this._send(EMsg.ClientHeartBeat, schema.CMsgClientHeartBeat.serialize({}));
}.bind(this), hbDelay * 1000);

this._webLoginKey = logonResp.webapiAuthenticateUserNonce;

this.chatRooms = {};
this.friends = {};
this.groups = {};
Expand Down Expand Up @@ -186,7 +188,6 @@ handlers[EMsg.ClientNewLoginKey] = function(data) {
uniqueId: loginKey.uniqueId
}));

this._webLoginKey = loginKey.loginKey;
// yes, number -> string -> ASCII bytes -> base64
this._webSessionID = new Buffer(loginKey.uniqueId.toString()).toString('base64');

Expand Down

0 comments on commit 00e01df

Please sign in to comment.