Merge pull request #195 from brooss/pairing-version-as-string

Pairing type mismatch for serverMajorVersion
This commit is contained in:
R. Aidan Campbell 2017-02-24 14:38:25 -07:00 committed by GitHub
commit db9a22f971

View File

@ -466,7 +466,7 @@ NvHTTP.prototype = {
if (this.currentGame != 0) if (this.currentGame != 0)
return false; return false;
return sendMessage('pair', [this.serverMajorVersion, this.address, randomNumber]).then(function (pairStatus) { return sendMessage('pair', [this.serverMajorVersion.toString(), this.address, randomNumber]).then(function (pairStatus) {
return sendMessage('openUrl', [this._baseUrlHttps + '/pair?uniqueid=' + this.clientUid + '&devicename=roth&updateState=1&phrase=pairchallenge', false]).then(function (ret) { return sendMessage('openUrl', [this._baseUrlHttps + '/pair?uniqueid=' + this.clientUid + '&devicename=roth&updateState=1&phrase=pairchallenge', false]).then(function (ret) {
$xml = this._parseXML(ret); $xml = this._parseXML(ret);
this.paired = $xml.find('paired').html() == "1"; this.paired = $xml.find('paired').html() == "1";