mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
tabstabstabstabstabs
This commit is contained in:
parent
8a2b35b48d
commit
832daf54db
3 changed files with 144 additions and 149 deletions
|
@ -1,7 +1,7 @@
|
|||
/************************************************
|
||||
*** Utilities to communicate with the server ***
|
||||
************************************************/
|
||||
var URL_BASE = "http://textsecure-test.herokuapp.com";
|
||||
var URL_BASE = "http://sushiforeveryone.bluematt.me";
|
||||
//var URL_BASE = "https://textsecure-service.whispersystems.org";
|
||||
var URL_CALLS = {};
|
||||
URL_CALLS['accounts'] = "/v1/accounts";
|
||||
|
@ -42,9 +42,8 @@ var API = new function() {
|
|||
|
||||
beforeSend : function(xhr) {
|
||||
if (param.user !== undefined &&
|
||||
param.password !== undefined) {
|
||||
param.password !== undefined)
|
||||
xhr.setRequestHeader("Authorization", "Basic " + btoa(getString(param.user) + ":" + getString(param.password)));
|
||||
}
|
||||
},
|
||||
|
||||
success : function(response, textStatus, jqXHR) {
|
||||
|
@ -69,7 +68,6 @@ var API = new function() {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
this.requestVerificationCode = function(number, success_callback, error_callback) {
|
||||
this.doAjax({
|
||||
call : 'accounts',
|
||||
|
@ -141,5 +139,4 @@ var API = new function() {
|
|||
do_auth : true
|
||||
});
|
||||
};
|
||||
|
||||
}(); // API
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
var FakeWhisperAPI = function() {
|
||||
|
||||
this.doAjax = function(param) {
|
||||
if (param.success_callback) {
|
||||
setTimeout(param.success_callback, 100, param.response);
|
||||
|
|
|
@ -891,7 +891,6 @@ function subscribeToPush(message_callback) {
|
|||
var proto = decodeIncomingPushMessageProtobuf(plaintext);
|
||||
// After this point, a) decoding errors are not the server's fault, and
|
||||
// b) we should handle them gracefully and tell the user they received an invalid message
|
||||
|
||||
API.pushMessage(message.id);
|
||||
} catch (e) {
|
||||
console.log("Error decoding message: " + e);
|
||||
|
|
Loading…
Reference in a new issue