|
|
@ -39387,7 +39387,9 @@ TextSecureServer = function () {
|
|
|
|
return textsecure.protocol_wrapper.createIdentityKeyRecvSocket().then(function(cryptoInfo) {
|
|
|
|
return textsecure.protocol_wrapper.createIdentityKeyRecvSocket().then(function(cryptoInfo) {
|
|
|
|
return new Promise(function(resolve) {
|
|
|
|
return new Promise(function(resolve) {
|
|
|
|
var socket = TextSecureServer.getTempWebsocket();
|
|
|
|
var socket = TextSecureServer.getTempWebsocket();
|
|
|
|
var wsr = new WebSocketResource(socket, function(request) {
|
|
|
|
var wsr = new WebSocketResource(socket, {
|
|
|
|
|
|
|
|
keepalive: { path: '/v1/keepalive' },
|
|
|
|
|
|
|
|
handleRequest: function(request) {
|
|
|
|
if (request.path == "/v1/address" && request.verb == "PUT") {
|
|
|
|
if (request.path == "/v1/address" && request.verb == "PUT") {
|
|
|
|
var proto = textsecure.protobuf.ProvisioningUuid.decode(request.body);
|
|
|
|
var proto = textsecure.protobuf.ProvisioningUuid.decode(request.body);
|
|
|
|
setProvisioningUrl([
|
|
|
|
setProvisioningUrl([
|
|
|
@ -39415,8 +39417,7 @@ TextSecureServer = function () {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log('Unknown websocket message', request.path);
|
|
|
|
console.log('Unknown websocket message', request.path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
}
|
|
|
|
keepalive: { path: '/v1/keepalive' }
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}).then(function() {
|
|
|
|
}).then(function() {
|
|
|
@ -39564,7 +39565,8 @@ function generateKeys(count, progressCallback) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.wsr = new WebSocketResource(this.socket, this.handleRequest.bind(this), {
|
|
|
|
this.wsr = new WebSocketResource(this.socket, {
|
|
|
|
|
|
|
|
handleRequest: this.handleRequest.bind(this),
|
|
|
|
keepalive: { path: '/v1/keepalive', disconnect: true }
|
|
|
|
keepalive: { path: '/v1/keepalive', disconnect: true }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|