Add signal agent to server requests

// FREEBIE
This commit is contained in:
lilia 2015-12-04 10:45:53 -08:00
parent 59ac5cb9b1
commit d4760452d1
2 changed files with 8 additions and 2 deletions

View file

@ -36305,6 +36305,8 @@ var TextSecureServer = (function() {
if (options.contentType) {
xhr.setRequestHeader( "Content-Type", options.contentType );
}
xhr.setRequestHeader( 'X-Signal-Agent', 'OWD' );
xhr.onload = function() {
var result = xhr.response;
@ -36618,13 +36620,14 @@ var TextSecureServer = (function() {
.replace('http://', 'ws://')
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
+ '&password=' + encodeURIComponent(this.password)
+ '&agent=OWD'
);
},
getProvisioningSocket: function () {
return new WebSocket(
this.url.replace('https://', 'wss://')
.replace('http://', 'ws://')
+ '/v1/websocket/provisioning/'
+ '/v1/websocket/provisioning/?agent=OWD'
);
}
};

View file

@ -40,6 +40,8 @@ var TextSecureServer = (function() {
if (options.contentType) {
xhr.setRequestHeader( "Content-Type", options.contentType );
}
xhr.setRequestHeader( 'X-Signal-Agent', 'OWD' );
xhr.onload = function() {
var result = xhr.response;
@ -353,13 +355,14 @@ var TextSecureServer = (function() {
.replace('http://', 'ws://')
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
+ '&password=' + encodeURIComponent(this.password)
+ '&agent=OWD'
);
},
getProvisioningSocket: function () {
return new WebSocket(
this.url.replace('https://', 'wss://')
.replace('http://', 'ws://')
+ '/v1/websocket/provisioning/'
+ '/v1/websocket/provisioning/?agent=OWD'
);
}
};