Commit Graph

129 Commits (9441fa98fd55793a15663638ff25e76f12eedf5c)

Author SHA1 Message Date
lilia 4c40861728 Fix reinstalls
Delay saving of new account info until we confirm with the server.
Explicitly delete old account info beforehand.

// FREEBIE
10 years ago
lilia db31835f68 Handle group sync for existing groups
// FREEBIE
10 years ago
lilia 5925c2fe84 Support for group sync
Protocol and handling is all analogous to contact sync: Multiple
GroupDetails structs are packed into a single attachment blob and parsed
on our end. We don't display the synced groups in the conversation list
until a new message is sent to one of them.

// FREEBIE
10 years ago
lilia f126e3b21b Work on auth error handling / reinstall 10 years ago
lilia 2f935dfd5e Add contact sync request protocol 10 years ago
lilia f32ff58953 Add support for device name 10 years ago
lilia 8dc4e34aaf Bug and test fixes for contact sync
Closes #135

// FREEBIE
10 years ago
lilia b0603bc91a Wrap message receiver for minimum api exposure
Initializing a message receiver opens the socket and starts listening
right away rather than requiring a separate call to connect. The only
other publicly accessible method is to query the socket status.

// FREEBIE
10 years ago
lilia 316838cfe9 Add tests and bug fixes for ContactBuffer 10 years ago
lilia 6d9854f456 Remove plaintext message test case
Support for the PLAINTEXT message type is not present in the latest
protobuf definitions. Leaving it out for now since we don't have any use
case for it currently.
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 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.
10 years ago
lilia 061d57c95a Fix string vs number comparison
Fix bug in device storage causing duplicate device messages after a 410.
11 years ago
lilia a9549e2e0f Fix 410 handling
We need to close the existing session with an old registrationId.
11 years ago
lilia 7d08e1132d Fix close session 11 years ago
lilia 7e8b1319a5 Ignore sync contexts on messages not from ourselves
But process the rest of the message normally.
11 years ago
lilia 090cc84452 Do not include destination on group sync messages 11 years ago
lilia d1bcafad65 Update libaxolotl 11 years ago
lilia 029c9754f0 Fix tests 11 years ago
lilia 704c6ce779 Signaling key is now an array buffer 11 years ago
lilia d230df5622 Move local identitykey and registrationid to indexeddb 11 years ago
lilia fe1d78b5fa Load protobufs asynchronously. Fixes #223 11 years ago
lilia 7799bef86c Tweak key conflict error messages
Be generic, because sometimes it's not TextSecure, but Signal.
11 years ago
lilia 359b4a15a2 Move group storage to axolotl store
Add async get/put/removeGroup to axolotl store and let libtextsecure
use it for group state storage.
11 years ago
lilia 748f32022a Fix up refreshGroup 11 years ago
lilia f774047935 Make libtextsecure group storage asynchronous 11 years ago
lilia 37c496f4f0 Close the provisioning socket 11 years ago
lilia 43d6efcd9e Don't save device objects to disk
Generate them from session and identity data. Save/delete pending prekey
data in an in-memory store and attach it to outgoing device objects.
11 years ago
lilia f413f03a6b Add getDeviceIds to axolotlstore
And add tests for getDeviceIds and removeAllSessions
11 years ago
lilia 121671c99f Store identity keys in indexeddb
Let device storage request them from axolotl store rather than storing a
copy.
11 years ago
lilia 7eda48f755 Move Session Storage to indexedDB 11 years ago
lilia 20ebc3f890 Move identity key storage functions to axolotl store 11 years ago
lilia f38b18ef63 Move Session storage to axolotlstore 11 years ago
lilia 9de1572ba6 Convert all storage.devices methods to be asynchronous 11 years ago
lilia 71715c95bc Async remove identity 11 years ago
lilia 26f1aa4db5 Async putSessionsForDevice 11 years ago
lilia 666f6baaca Async getSessionsForNumber 11 years ago
lilia 9e7d8c0a08 Rename textsecure.api and make it internal-only 11 years ago
lilia 45a61780af Fixup refreshPreKeys and call it whenever a prekey is deleted 11 years ago
lilia 7d0aeac8cb Use a worker to facilitate key generation 11 years ago
lilia f465bdddbf Add textsecure.AccountManager
This class should be used for account registration and for refreshing
prekeys for your account.
11 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
11 years ago
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
11 years ago
lilia 8304aa903a Update libaxololt to a087b9e746e67995f16e077183cc0 11 years ago
lilia 2ff954d2f8 Fix api.js 11 years ago
lilia e4b49bde51 Add more websocket tests 11 years ago
lilia cc6a44f35d Fix tests 11 years ago
lilia 3ea254d0db Add TextSecureWebSocket tests 11 years ago
lilia 849a407433 Add mock-socket for testing socket stuff 11 years ago
lilia da34b8e0f8 Rename textsecure.websocket and make it internal-only 11 years ago