Rename textsecure.api and make it internal-only

This commit is contained in:
lilia 2015-04-30 14:10:04 -07:00
parent 45a61780af
commit 9e7d8c0a08
7 changed files with 24 additions and 28 deletions

View file

@ -41,7 +41,7 @@
registerSecondDevice: function(setProvisioningUrl, confirmNumber, progressCallback) {
return textsecure.protocol_wrapper.createIdentityKeyRecvSocket().then(function(cryptoInfo) {
return new Promise(function(resolve) {
new WebSocketResource(textsecure.api.getTempWebsocket(), function(request) {
new WebSocketResource(TextSecureServer.getTempWebsocket(), function(request) {
if (request.path == "/v1/address" && request.verb == "PUT") {
var proto = textsecure.protobuf.ProvisioningUuid.decode(request.body);
setProvisioningUrl([
@ -72,7 +72,7 @@
}).then(TextSecureServer.registerKeys).then(textsecure.registration.done);
},
refreshPreKeys: function() {
return textsecure.api.getMyKeys().then(function(preKeyCount) {
return TextSecureServer.getMyKeys().then(function(preKeyCount) {
if (preKeyCount < 10) {
return generateKeys(100).then(TextSecureServer.registerKeys);
}
@ -92,7 +92,7 @@
var registrationId = axolotl.util.generateRegistrationId();
textsecure.storage.put("registrationId", registrationId);
return textsecure.api.confirmCode(
return TextSecureServer.confirmCode(
number, verificationCode, password, signalingKey, registrationId, single_device
).then(function(response) {
textsecure.storage.user.setNumberAndDeviceId(number, response.deviceId || 1);