Fix registration

Previously would fail to register keys by using the wrong username.
The username should be <number>.<deviceid> once we've confirmed our
account and received a deviceId from the server.

// FREEBIE
This commit is contained in:
lilia 2015-10-01 20:34:36 -07:00
parent 978b3d1a98
commit 1aee065c2c
2 changed files with 4 additions and 2 deletions

View file

@ -39115,7 +39115,8 @@ var TextSecureServer = (function() {
textsecure.storage.user.setNumberAndDeviceId(number, response.deviceId || 1, deviceName);
textsecure.storage.put('regionCode', libphonenumber.util.getRegionCodeForNumber(number));
});
this.server.username = textsecure.storage.get('number_id');
}.bind(this));
},
generateKeys: function (count, progressCallback) {
if (typeof progressCallback !== 'function') {

View file

@ -110,7 +110,8 @@
textsecure.storage.user.setNumberAndDeviceId(number, response.deviceId || 1, deviceName);
textsecure.storage.put('regionCode', libphonenumber.util.getRegionCodeForNumber(number));
});
this.server.username = textsecure.storage.get('number_id');
}.bind(this));
},
generateKeys: function (count, progressCallback) {
if (typeof progressCallback !== 'function') {