Commit Graph

45 Commits (33429bd6f77331826c8f0e88ad4b9c90fb75d380)

Author SHA1 Message Date
lilia ccc98d2f3d Fixup delivery receipts
Uses app-level timestamps for outgoing messages.
Adds timestamp property to the outgoing jsonData.
Triggers a runtime event to notify frontend on delivery receipts.
Renders delivered messages with a 'delivered' class.
10 years ago
Daniel Reichert db5683a69d Move Base64 functions to their own file
Remove Base64 string functions from helpers.js

Rename Base64 string functions

Removed unused functions from stringview.js
11 years ago
lilia ee0d7edc0b WebSocket-Resources / websocket refactor
This commit provides the javascript complement to
[WebSocket-Resources](https://github.com/WhisperSystems/WebSocket-Resources),
allowing us to use a bi-directional request-response framework over
websockets.

See websocket-resources.js and websocket-resources_test.js
for usage details.

Along the way I also factored the websocket keepalive and reconnect
logic into its own file/wrapper object.
11 years ago
lilia 7f04439b37 New websocket protocol 11 years ago
Sumit Bindal d537d6a91f Fixing lint errors
Fixing JSLint Problems
11 years ago
lilia 74bfc9d04e Wrap some long lines 11 years ago
lilia e35148add8 No, jQuery, don't processData!
processData (default: true)
Type: Boolean
By default, data passed in to the data option as an object (technically,
anything other than a string) will be processed and transformed into a
query string, fitting to the default content-type
"application/x-www-form-urlencoded". If you want to send a DOMDocument,
or other non-processed data, set this option to false.

https://api.jquery.com/jQuery.ajax/
11 years ago
lilia 211129475c Fix attachment ids
Parse attachment ids out of the attachment pointer url and return them
as strings because the copy parsed by JSON suffers a loss of precision.
Convert them to and from the format expected by the protobuf using
facilities from decodeIO.Long.
11 years ago
lilia 838283f28b Send acks instead of closing and opening the socket
Hopefully the real fix for #67 until we get protocol-level pings from
the wc3 api.
11 years ago
lilia e831c649bd Require a mandatory websocket reset once a minute
Compensate for the lack of keepalives in the WebSocket API.

Fixes #67
11 years ago
lilia a3bf40e852 Shorten websocket time out. Fixes #67 11 years ago
lilia 03cc667e48 Standardize some whitespace
The preferred style is 4 spaces.
11 years ago
lilia 2bd77693e1 Refactor options page and style using bootstrap 11 years ago
lilia 27708cd8d7 Switch to staging. -ca is now production 11 years ago
Matt Corallo 90eb9cb0c8 Remove ping, update to latest spec proposal 11 years ago
Matt Corallo f6f35c5b61 Fix a missing function and dont blow up on delivery receipts 11 years ago
Matt Corallo a6b0d1f84b Add entirely untested secondary device init 11 years ago
Matt Corallo c427da04f0 Add closeSession tests as Alice and fix re-requesting prekeys 11 years ago
Matt Corallo 0d4ae6a8cb Fix undefined variable in for's (browser update to strict mode?) 11 years ago
Matt Corallo de83429962 v3 steps 11 years ago
Matt Corallo 66bf371aa7 Use staging server (ie update to server keys v2) and protocolv3 11 years ago
Matt Corallo d0fd3e94d8 sendMessage refactor, initial group stuff (breaks message storage) 11 years ago
Matt Corallo cf35b7056f Retry API, standardize <script> list 11 years ago
Matt Corallo 5cea7b6857 Few typos blocking registration 11 years ago
Matt Corallo aec36468bc Request new keys (largely untested) 11 years ago
Matt Corallo 56433bd9af One more tiny error refactor 11 years ago
Matt Corallo 68131a6e2a Add human readable version of errors 11 years ago
Matt Corallo 753a950816 Redo registration process 11 years ago
Matt Corallo ac48d552fa Fix some bugs recently introduced 11 years ago
Matt Corallo 18f1eed70f Some number verification refactor stuff 11 years ago
Matt Corallo d9bf0a41fb textsecure.storage, chromium.js 11 years ago
lilia ed3aa9667d Fix undefined URL_BASE in background.js
Sieze an opportunity to move code out of the helpers.js.
Only 616 more lines to go.
11 years ago
Matt Corallo 6bc19ef558 More namespacing 11 years ago
Matt Corallo 07a23f0759 Fix attachments 11 years ago
Matt Corallo 3103eaa192 Commit broken attachment loader (S3 403s I can't figure out...) 11 years ago
Matt Corallo 8d408e6d8f THOUGH SALL USE TABSTOP AND SHIFTWIDTH 4 (so that indents read right) 11 years ago
lilia e3b00e08f3 Generate and submit registrationId, fixes #25
If we're expecting to get registrationIds from others, it's only fair
that we also supply our own.
11 years ago
Matt Corallo 5752a772d1 promises, type conversion errors 11 years ago
Matt Corallo caa363b929 FINALLY report crypto, etc errors to console thanks to promises... 11 years ago
Matt Corallo 3e60368a16 LGPL license (I'd like to be an axolotl/TS JS lib in the future) 11 years ago
Matt Corallo 2ae5628122 Send-to-self works =D 11 years ago
Matt Corallo 136a8941c1 Things:
* key API changes moxie made because he disliked the other API
 * remove atmosphere
 * Fix some bugs in the send path, update for new send API
 * Send HTML
11 years ago
Matt Corallo 000a5e1440 Fix up a few things so registration works 11 years ago
Matt Corallo 832daf54db tabstabstabstabstabs 11 years ago
lilia 6934ba0b92 Refactor Server API functions
The details of the server API are now mostly relegated to api.js, and
accessed through the API container object, improving modularity and
readability, and setting us up to derive a FakeAPI for serverless
development.
11 years ago