Async putSessionsForDevice
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user