From e59a5792d53216d7616b0c6f01ef7422e185ac0c Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 7 Aug 2015 17:01:36 -0700 Subject: [PATCH] Don't hardcode the attachment host --- js/libtextsecure.js | 3 +-- libtextsecure/api.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 872318494..50c605975 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38900,7 +38900,6 @@ TextSecureServer = function () { ************************************************/ // Staging server var URL_BASE = "https://textsecure-service-staging.whispersystems.org"; - var ATTACHMENT_HOST = "whispersystems-textsecure-attachments-staging.s3.amazonaws.com"; // This is the real server //var URL_BASE = "https://textsecure-service.whispersystems.org"; @@ -39176,7 +39175,7 @@ TextSecureServer = function () { }); }; - var id_regex = RegExp( "^https:\/\/" + ATTACHMENT_HOST + "\/(\\d+)\?"); + var id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?"); self.putAttachment = function(encryptedBin) { return doAjax({ call : 'attachment', diff --git a/libtextsecure/api.js b/libtextsecure/api.js index 04e3042e0..93501213c 100644 --- a/libtextsecure/api.js +++ b/libtextsecure/api.js @@ -12,7 +12,6 @@ TextSecureServer = function () { ************************************************/ // Staging server var URL_BASE = "https://textsecure-service-staging.whispersystems.org"; - var ATTACHMENT_HOST = "whispersystems-textsecure-attachments-staging.s3.amazonaws.com"; // This is the real server //var URL_BASE = "https://textsecure-service.whispersystems.org"; @@ -288,7 +287,7 @@ TextSecureServer = function () { }); }; - var id_regex = RegExp( "^https:\/\/" + ATTACHMENT_HOST + "\/(\\d+)\?"); + var id_regex = RegExp( "^https:\/\/.*\/(\\d+)\?"); self.putAttachment = function(encryptedBin) { return doAjax({ call : 'attachment',