Commit Graph

38 Commits (2457d51fd4087a53b44ca4266d190fa5fc6a5581)

Author SHA1 Message Date
codedust 5e255e9df0 Remove 'Textsecure' from error message in api.js 10 years ago
lilia f863616785 Remove api TODO comments
// FREEBIE
10 years ago
lilia 81ebc5ffd7 Improve stack traces on HTTPErrors
Save stack even earlier, outside the promise.

// FREEBIE
10 years ago
lilia c062fe3060 Automatically retry failed http requests
If we failed to reach the server, wait a second and try again up to 3
times.

// FREEBIE
10 years ago
lilia 816a206892 Refactor sendMessageToDevices
Split into separate encrypt and transmit functions. Let the encryption
function also handle all wire formatting (ie, jsonification and base64
encoding), which simplifes TextSecureServer.sendMessages, removes a
TODO, and lets us save fewer params to make network errors replayable.

// FREEBIE
10 years ago
lilia e9bc39bc56 Add parens and line breaks
// FREEBIE
10 years ago
lilia 868695558d Throw on bad server url
// FREEBIE
10 years ago
lilia 98aa5156b0 Refactor TextSecureServer for storage
Following the pattern from previous commit, let the server class accept
a url and login credentials from the caller. Then integrate into
MessageReceiver and AccountManager.

// FREEBIE
10 years ago
lilia 37ff3cf5a8 Change http logging
Printing method + url again makes it easier to match requests to
responses when scanning logs.

// FREEBIE
10 years ago
lilia f70e844cef Include url in http response logging
Otherwise it's impossible to tell which is which, especially when
sending group messages.

// FREEBIE
10 years ago
lilia e59a5792d5 Don't hardcode the attachment host 10 years ago
lilia 184e37383c Don't auto-populate the relay field
According to server api docs, relay is optional when it is the same as
our own server.

// FREEBIE
10 years ago
lilia 537f0ceef0 Log all http requests at start and end
// FREEBIE
10 years ago
lilia 04c8796bd3 Disable socket level reconnect
This is now handled at a higher level by the message receiver with the
aid of http requests for diagnosing the disconnect.

// FREEBIE
10 years ago
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
10 years ago
lilia 0d0bdbf998 Don't auto-reconnect provisioning socket
// FREEBIE
10 years ago
lilia 15cd348bf2 Remove nonexistant variable 10 years ago
lilia 1f8856fa69 MessageReceiver accepts a server websocket url
// FREEBIE
10 years ago
lilia b40a8696b7 DRY up Promise creation in api.js
Since calls to ajax() are always wrapped in promises, we can internalize
that pattern in the ajax function itself.

// FREEBIE
10 years ago
lilia 3711e0a6cd Convert throwHumanError to custom error type
Now with 200% more helpful stack traces.

// FREEBIE
10 years ago
lilia f126e3b21b Work on auth error handling / reinstall 10 years ago
lilia f32ff58953 Add support for device name 10 years ago
lilia 228ffe901d Update json formatting for legacy message requests
Legacy DataMessages are sent using the `body` field, new Content
messages are sent using the `content` field.

// FREEBIE
10 years ago
lilia 9e7d8c0a08 Rename textsecure.api and make it internal-only 10 years ago
lilia a960acacc6 Add textsecure.refreshKeys
This helper checks the server for the number of remaining prekeys, then
generates more if there are fewer than 10 remaining.

// FREEBIE
10 years ago
lilia 2ff954d2f8 Fix api.js 10 years ago
lilia da34b8e0f8 Rename textsecure.websocket and make it internal-only 10 years ago
lilia 89c24cd2fa Move throwHumanError to api.js
It is only used there.
10 years ago
lilia 7af42a27c5 Fix registerKeys using array indices for key ids
preKeys is an array whose indices may or may not be keyId-based. Since
we have an inline keyId property, use that instead.
10 years ago
Matt Corallo 00cb420d37 Merge (un)encrypted storage layers 10 years ago
Matt Corallo 454b4726bd Replace load/decode/index around our own number with helpers 10 years ago
lilia 3759fe46e9 Account for -1 HTTPError code 10 years ago
lilia e52224e481 Remove libtextsecure's jquery dependency
Use only the finest, hand-crafted, artisanal XMLHttpRequests.
10 years ago
Matt Corallo 12844590f5 Move prekey sigcheck to libaxolotl 10 years ago
Matt Corallo 66cf5b08db Naively move textsecure.crypto into axolotl.crypto 10 years ago
Matt Corallo 02d0c58e5e Mostly done device-bringup stuff 10 years ago
Matt Corallo 29b2ffc769 Update to real server provisioning API 10 years ago
Matt Corallo 8ad1a38b5b Move js files around for libtextsecure split 10 years ago