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:
@@ -104,8 +104,8 @@ Message.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
function MessageSender(url, ports, username, password, attachment_server_url) {
|
||||
this.server = new TextSecureServer(url, ports, username, password, attachment_server_url);
|
||||
function MessageSender(url, ports, username, password) {
|
||||
this.server = new TextSecureServer(url, ports, username, password);
|
||||
this.pendingMessages = {};
|
||||
}
|
||||
|
||||
@@ -512,8 +512,8 @@ MessageSender.prototype = {
|
||||
|
||||
window.textsecure = window.textsecure || {};
|
||||
|
||||
textsecure.MessageSender = function(url, ports, username, password, attachment_server_url) {
|
||||
var sender = new MessageSender(url, ports, username, password, attachment_server_url);
|
||||
textsecure.MessageSender = function(url, ports, username, password) {
|
||||
var sender = new MessageSender(url, ports, username, password);
|
||||
textsecure.replay.registerFunction(sender.tryMessageAgain.bind(sender), textsecure.replay.Type.ENCRYPT_MESSAGE);
|
||||
textsecure.replay.registerFunction(sender.retransmitMessage.bind(sender), textsecure.replay.Type.TRANSMIT_MESSAGE);
|
||||
textsecure.replay.registerFunction(sender.sendMessage.bind(sender), textsecure.replay.Type.REBUILD_MESSAGE);
|
||||
|
Reference in New Issue
Block a user