Log websocket urls
// FREEBIE
This commit is contained in:
parent
0487fa3cd1
commit
384598fbcc
2 changed files with 12 additions and 10 deletions
|
@ -37849,19 +37849,20 @@ var TextSecureServer = (function() {
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
getMessageSocket: function() {
|
getMessageSocket: function() {
|
||||||
|
var url = this.getUrl();
|
||||||
|
console.log('opening message socket', url);
|
||||||
return new WebSocket(
|
return new WebSocket(
|
||||||
this.getUrl().replace('https://', 'wss://')
|
url.replace('https://', 'wss://').replace('http://', 'ws://')
|
||||||
.replace('http://', 'ws://')
|
|
||||||
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
||||||
+ '&password=' + encodeURIComponent(this.password)
|
+ '&password=' + encodeURIComponent(this.password)
|
||||||
+ '&agent=OWD'
|
+ '&agent=OWD'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getProvisioningSocket: function () {
|
getProvisioningSocket: function () {
|
||||||
console.log('opening provisioning socket', this.url);
|
var url = this.getUrl();
|
||||||
|
console.log('opening provisioning socket', url);
|
||||||
return new WebSocket(
|
return new WebSocket(
|
||||||
this.getUrl().replace('https://', 'wss://')
|
url.replace('https://', 'wss://').replace('http://', 'ws://')
|
||||||
.replace('http://', 'ws://')
|
|
||||||
+ '/v1/websocket/provisioning/?agent=OWD'
|
+ '/v1/websocket/provisioning/?agent=OWD'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -377,19 +377,20 @@ var TextSecureServer = (function() {
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
getMessageSocket: function() {
|
getMessageSocket: function() {
|
||||||
|
var url = this.getUrl();
|
||||||
|
console.log('opening message socket', url);
|
||||||
return new WebSocket(
|
return new WebSocket(
|
||||||
this.getUrl().replace('https://', 'wss://')
|
url.replace('https://', 'wss://').replace('http://', 'ws://')
|
||||||
.replace('http://', 'ws://')
|
|
||||||
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
||||||
+ '&password=' + encodeURIComponent(this.password)
|
+ '&password=' + encodeURIComponent(this.password)
|
||||||
+ '&agent=OWD'
|
+ '&agent=OWD'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getProvisioningSocket: function () {
|
getProvisioningSocket: function () {
|
||||||
console.log('opening provisioning socket', this.url);
|
var url = this.getUrl();
|
||||||
|
console.log('opening provisioning socket', url);
|
||||||
return new WebSocket(
|
return new WebSocket(
|
||||||
this.getUrl().replace('https://', 'wss://')
|
url.replace('https://', 'wss://').replace('http://', 'ws://')
|
||||||
.replace('http://', 'ws://')
|
|
||||||
+ '/v1/websocket/provisioning/?agent=OWD'
|
+ '/v1/websocket/provisioning/?agent=OWD'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue