Don't hardcode the attachment server url
There may come a day when we may need to change this url from the server side. On that day, clients should continue to operate normally. The service should be able to change attachment server locations without requiring a client update. // FREEBIE
This commit is contained in:
parent
43de0cc2ec
commit
611bbaef35
6 changed files with 21 additions and 70 deletions
|
@ -2,12 +2,12 @@
|
|||
* vim: ts=4:sw=4:expandtab
|
||||
*/
|
||||
|
||||
function MessageReceiver(url, ports, username, password, signalingKey, attachment_server_url) {
|
||||
function MessageReceiver(url, ports, username, password, signalingKey) {
|
||||
this.url = url;
|
||||
this.signalingKey = signalingKey;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.server = new TextSecureServer(url, ports, username, password, attachment_server_url);
|
||||
this.server = new TextSecureServer(url, ports, username, password);
|
||||
|
||||
var address = libsignal.SignalProtocolAddress.fromString(username);
|
||||
this.number = address.getName();
|
||||
|
@ -478,8 +478,8 @@ MessageReceiver.prototype.extend({
|
|||
|
||||
window.textsecure = window.textsecure || {};
|
||||
|
||||
textsecure.MessageReceiver = function(url, ports, username, password, signalingKey, attachment_server_url) {
|
||||
var messageReceiver = new MessageReceiver(url, ports, username, password, signalingKey, attachment_server_url);
|
||||
textsecure.MessageReceiver = function(url, ports, username, password, signalingKey) {
|
||||
var messageReceiver = new MessageReceiver(url, ports, username, password, signalingKey);
|
||||
this.addEventListener = messageReceiver.addEventListener.bind(messageReceiver);
|
||||
this.removeEventListener = messageReceiver.removeEventListener.bind(messageReceiver);
|
||||
this.getStatus = messageReceiver.getStatus.bind(messageReceiver);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue