Refactor api.js into web_api, which encapsulates all web access
This commit is contained in:
parent
37ebe9fcec
commit
f3bd0cf903
16 changed files with 763 additions and 577 deletions
|
@ -5,7 +5,7 @@
|
|||
var ARCHIVE_AGE = 7 * 24 * 60 * 60 * 1000;
|
||||
|
||||
function AccountManager(url, username, password) {
|
||||
this.server = new TextSecureServer(url, username, password);
|
||||
this.server = window.WebAPI.connect({ username, password });
|
||||
this.pending = Promise.resolve();
|
||||
}
|
||||
|
||||
|
@ -426,7 +426,6 @@
|
|||
'regionCode',
|
||||
libphonenumber.util.getRegionCodeForNumber(number)
|
||||
);
|
||||
this.server.username = textsecure.storage.get('number_id');
|
||||
}.bind(this)
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue