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:
parent
9b2e2a4605
commit
bbab4bba10
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue