Commit graph

88 commits

Author SHA1 Message Date
lilia
3624887d73 Remove unused requires in Gruntfile
Artifacts from the libaxolotl curve25519 compilation task.

// FREEBIE
2016-02-01 15:54:24 -08:00
lilia
3383505377 Fix jshint errors
jshint complains:
  ^ ['placeholders'] is better written in dot notation.
  ^ Missing semicolon.

// FREEBIE
2016-01-25 14:21:46 -08:00
lilia
693dd2bb46 Remove locale-patch from default grunt task
// FREEBIE
2016-01-25 14:21:46 -08:00
Sam Lanning
b7fd862aa6 Create tx task which performs 'tx pull' followed by 'locale-patch'
// FREEBIE
2016-01-25 14:21:46 -08:00
Sam Lanning
c5a9714a0a Automatically patch translations with placeholders
fixes #630

// FREEBIE
2016-01-25 14:21:46 -08:00
lilia
f7c4fd2fed DRY up event target implementations
Dedupe event target code and make it extensible.

// FREEBIE
2016-01-14 15:44:42 -08:00
lilia
925c1bdb33 Add SyncRequest class
Similar in function to an xhr request, a textsecure.SyncRequest object
is initialized from a message sender and receiver pair and initiates a
request for sync from the master device. It later fires a success event
when both contacts and groups are done syncing, or a timeout event after
one minute.

// FREEBIE
2016-01-14 15:44:42 -08:00
lilia
e9d3272e87 Prepare for i18n
// FREEBIE
2016-01-02 02:51:23 -08:00
lilia
4cc6b1ff9a Validate attachment urls
// FREEBIE
2015-11-24 16:20:07 -08:00
lilia
4358a46ac4 Remove unused file // FREEBIE 2015-11-20 14:17:58 -08:00
lilia
038e263023 Fix the build
1. Update chrome version because v40 fails to clear the session store
2. Add message view to test page and fix bad reference to chrome
3. Update the message view template in tests with new timestmap markup

// FREEBIE
2015-11-08 10:35:24 -08:00
lilia
12276e691b Refactor contents of sendMessageProto
This function dynamically declares a bunch of functions which bind to
its input arguments. Instead, use a new prototypal class to define
these functions within the context of a particular message.

// FREEBIE
2015-10-23 15:53:20 -07:00
lilia
b9b01330fe Move jquery from libtextsecure components
Jquery is not required by libtextsecure, but our test coverage tool,
blanket, depends on it.

// FREEBIE
2015-10-19 12:51:59 -07:00
lilia
b0112e8c2e Remove unnecessary check in gruntfile
There's only one reference to the server url nowadays.

// FREEBIE
2015-10-16 18:19:25 -07:00
lilia
bc0c9bd133 Remove attachment host string replace
This host is no longer hard coded anywhere.

// FREEBIE
2015-10-02 18:00:40 -07:00
lilia
e30ac86c8a Remove deleted file from concatentation list
// FREEBIE
2015-10-01 18:43:17 -07:00
lilia
0ec9e691d8 Tweak dev and default grunt tasks
Preen is only needed when installing new components so take that out of
the default task.

Dev task was set up to run sass after watch which can't happen since
watch loops forever, watching. Instead, do a rebuild of js and sass
files before starting the watch.

// FREEBIE
2015-08-31 16:45:49 -07:00
lilia
c89d5e59a3 Fixup saucelabs
For some reason, today, firefox sessions fail to spin up when the
platform is not explicitly set to linux.
2015-07-29 17:45:57 -07:00
lilia
05e81a3604 Let grunt-saucelabs wait a little longer for status 2015-07-28 17:36:59 -07:00
lilia
9f8b632fb5 Fix up sauce config 2015-07-28 17:08:30 -07:00
lilia
8851a64bce Increase saucelabs test timeout
We now have 4 tests that take roughly a minute each since they are
testing keepalive timeouts.
2015-07-28 15:42:19 -07:00
lilia
cd363bd84d Integrate keepalives into websocket resources 2015-07-28 13:07:34 -07:00
lilia
d9d4e281cc Keepalive provisioning socket
Fixes #315

// FREEBIE
2015-07-27 18:16:47 -07:00
lilia
1f8856fa69 MessageReceiver accepts a server websocket url
// FREEBIE
2015-07-23 16:10:43 -07:00
lilia
9f1af24b9c Remove old curve25519 build task 2015-06-24 13:40:45 -07:00
lilia
a833d62a71 Implement sync protocol changes
Update protobuf definitions and refactor message receive and decrypt
codepath to support new protocol, including various flavors of sync
messages (sent messages, contacts, and groups).

Also cleans up background.js and lets libtextsecure internalize
textsecure.processDecrypted and ensure that it is called before handing
DataMessages off to the application.

The Envelope structure now has a generic content field and a
legacyMessage field for backwards compatibility. We'll send outgoing
messages as legacy messages, and sync messages as "content" while
continuing to support both legacy and non-legacy messages on the receive
side until old clients have a chance to transition.
2015-06-17 12:29:39 -07:00
lilia
37086fde19 Modify default grunt task to include copy 2015-05-20 14:24:25 -07:00
lilia
88f0aa471f Correct production server url 2015-05-15 14:03:12 -07:00
lilia
242f1e80a7 Fix image corruption in /dist 2015-05-15 14:02:29 -07:00
lilia
7da9a1d5a7 Use production server in /dist 2015-05-07 15:01:46 -07:00
lilia
7d0aeac8cb Use a worker to facilitate key generation 2015-05-05 17:44:55 -07:00
lilia
f465bdddbf Add textsecure.AccountManager
This class should be used for account registration and for refreshing
prekeys for your account.
2015-05-05 17:44:55 -07:00
lilia
96eafc7750 Integrate libaxolotl async storage changes
* Session records are now opaque strings, so treat them that way:
  - no more cross checking identity key and session records
  - Move hasOpenSession to axolotl wrapper
  - Remote registration ids must be fetched async'ly via protocol wrapper
* Implement async AxolotlStore using textsecure.storage
* Add some db stores and move prekeys and signed keys to indexeddb
* Add storage tests
* Rename identityKey storage key from libaxolotl25519KeyidentityKey to
  simply identityKey, since it's no longer hardcoded in libaxolotl
* Rework registration and key-generation, keeping logic in libtextsecure
  and rendering in options.js.
* Remove key_worker since workers are handled at the libaxolotl level
  now
2015-05-05 17:44:55 -07:00
lilia
849a407433 Add mock-socket for testing socket stuff 2015-04-30 15:43:11 -07:00
lilia
36b1e87214 Add textsecure.MessageReceiver
Encapsulate the websocket resources and socket setup process in a
friendly OO class. The MessageReceiver constructor expects an instance
of EventTarget on which to fire message events asynchronously. The
provider of the EventTarget can then add/remove listeners as desired.
2015-04-29 16:50:20 -07:00
lilia
c68bf07409 Don't jscs the generated key_worker.js 2015-04-15 17:06:06 -07:00
lilia
bdecf5cc44 Generate key_worker.js
Instead of calling importScripts, which is prone to relative path
issues, generate the worker script with everything it needs included.
2015-04-15 15:38:57 -07:00
lilia
23feeecbcf Wrap libts, don't leak into global namespace 2015-04-05 16:42:08 -07:00
lilia
9effa85e40 Remove libaxolotl concat task 2015-04-05 16:42:07 -07:00
Matt Corallo
454b4726bd Replace load/decode/index around our own number with helpers 2015-03-25 11:54:55 -07:00
lilia
ebdc8650ed Fix copy task 2015-03-20 10:47:45 -07:00
lilia
c526dbda5f Set up production build task
`grunt copy`

Closes #191
2015-03-19 18:34:56 -07:00
Matt Corallo
d3c158f4cf Move libaxolotl out-of-tree 2015-03-17 14:43:23 -07:00
lilia
5df56663ef Let jscs ignore libtextsecure.js
Fix warnings about mixed tabs and spaces. They are in compiled code.
2015-03-16 16:28:53 -07:00
lilia
9e04910124 Recompile curve25519 with emcc 1.29.0
Now with actual malloc/free implementations. Had to drop back to -O1
optimization because the ed25519 signature test broke with -O2. :(

Closes #153

The toolchain install and build process, for reference:
```
wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
tar xvfz emsdk-portable.tar.gz
cd emsdk-portable
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ../TextSecure-Browser
grunt build
```
2015-03-16 16:07:47 -07:00
lilia
8ee282b1aa Restyle registration page
When first intalling, users will no longer be presented with the option
to register as a standalone client.

For developer convenience, the standalone form can still be found at
chrome-extension://.../register.html

Closes #159
2015-03-06 15:27:49 -08:00
lilia
a9cf4bd93e Update test config to run against latest Chrome
Break up some long lines while I'm here.
2015-03-05 18:29:00 -08:00
lilia
f35e8f347e Add grunt watch tasks to rebuild libs 2015-02-23 11:58:21 -08:00
lilia
ec43a0b633 jshint all the things
Small style fixes here and there. Removed one unused file.
2015-02-19 00:22:23 -08:00
lilia
76da5bb4f9 Add background.js to jshint 2015-02-18 23:59:41 -08:00