Fix device ID check, clean up prekey fetch logging (#1961)

* DeviceId is a string, so we use the less-strict comparison

* Clean up prekey fetch logging
This commit is contained in:
Scott Nonnenberg 2018-01-10 18:12:24 -08:00 committed by GitHub
parent 9b2e2a4605
commit bbab4bba10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -192,7 +192,7 @@
privKey: prekey.get('privateKey'),
});
}, function() {
console.log('Failed to load prekey:', keyId);
console.log('Failed to fetch prekey:', keyId);
resolve();
});
});
@ -235,7 +235,7 @@
var prekey = new SignedPreKey({id: keyId});
return new Promise(function(resolve) {
prekey.fetch().then(function() {
console.log('Successfully loaded prekey:', prekey.get('id'));
console.log('Successfully fetched signed prekey:', prekey.get('id'));
resolve({
pubKey : prekey.get('publicKey'),
privKey : prekey.get('privateKey'),
@ -244,7 +244,7 @@
confirmed : prekey.get('confirmed'),
});
}).fail(function() {
console.log('Failed to load signed prekey:', keyId);
console.log('Failed to fetch signed prekey:', keyId);
resolve();
});
});

View file

@ -422,7 +422,7 @@ MessageSender.prototype = {
var myDevice = textsecure.storage.user.getDeviceId();
var now = Date.now();
if (myDevice === 1) {
if (myDevice == 1) {
return Promise.resolve();
}