Async putSessionsForDevice
This commit is contained in:
parent
666f6baaca
commit
26f1aa4db5
3 changed files with 37 additions and 35 deletions
|
@ -177,9 +177,7 @@
|
|||
putSession: function(identifier, record) {
|
||||
if (identifier === null || identifier === undefined)
|
||||
throw new Error("Tried to put session for undefined/null key");
|
||||
return new Promise(function(resolve) {
|
||||
resolve(textsecure.storage.sessions.putSessionsForDevice(identifier, record));
|
||||
});
|
||||
return textsecure.storage.sessions.putSessionsForDevice(identifier, record);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -38111,6 +38111,7 @@ axolotlInternal.RecipientRecord = function() {
|
|||
},
|
||||
|
||||
putSessionsForDevice: function(encodedNumber, record) {
|
||||
return Promise.resolve((function() {
|
||||
var number = textsecure.utils.unencodeNumber(encodedNumber)[0];
|
||||
var deviceId = textsecure.utils.unencodeNumber(encodedNumber)[1];
|
||||
|
||||
|
@ -38129,6 +38130,7 @@ axolotlInternal.RecipientRecord = function() {
|
|||
};
|
||||
}
|
||||
return textsecure.storage.devices.saveDeviceObject(device);
|
||||
})());
|
||||
},
|
||||
|
||||
// Use textsecure.storage.devices.removeIdentityKeyForNumber (which calls this) instead
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
},
|
||||
|
||||
putSessionsForDevice: function(encodedNumber, record) {
|
||||
return Promise.resolve((function() {
|
||||
var number = textsecure.utils.unencodeNumber(encodedNumber)[0];
|
||||
var deviceId = textsecure.utils.unencodeNumber(encodedNumber)[1];
|
||||
|
||||
|
@ -58,6 +59,7 @@
|
|||
};
|
||||
}
|
||||
return textsecure.storage.devices.saveDeviceObject(device);
|
||||
})());
|
||||
},
|
||||
|
||||
// Use textsecure.storage.devices.removeIdentityKeyForNumber (which calls this) instead
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue