Commit Graph

615 Commits (04b45f6aa18dab110c1d9f9c2b413c850be219fe)

Author SHA1 Message Date
sachaaaaa 04b45f6aa1 Decrypt friend-request messages (the ones using fallback encryption). Moved logic into a new file libloki-protocol.js and concat loki code into js/libloki.js
sachaaaaa 5e9f4177ff style nits
sachaaaaa d6954aa91c Wrap outgoing message in a WebSocketMessage proto object to match incoming format
sachaaaaa 38e6272dc6 Use async/await in addMockContact instead of nested promises
sachaaaaa 42e941531f Add fallback encryption (FallBackSessionCipher. simple DH) for when key bundle hasn't been received yet. Skip padding of bytes.
sachaaaaa ac92d53e14 display mock contact priv key for debugging
sachaaaaa e81e253ccf temporarily disable decryption and unpadding of incoming messages
sachaaaaa 6b998d79a7 Fix message_receiver not able to convert ArrayBuffer to stringBase64 in addToCache
sachaaaaa 2631d195fd allow generating a mock contact via console without saving its key bundle
sachaaaaa 33ad509fbf Merge branch 'master' of https://github.com/signalapp/Signal-Desktop into development
# Conflicts:
#	_locales/ar/messages.json
#	_locales/es_419/messages.json
#	_locales/he/messages.json
#	_locales/hi/messages.json
#	_locales/hr/messages.json
#	_locales/kn/messages.json
#	_locales/ko/messages.json
#	_locales/mk/messages.json
#	_locales/sr/messages.json
#	_locales/uk/messages.json
#	_locales/vi/messages.json
#	package.json
Scott Nonnenberg 814b9cf26a Only accept 'you left group' messages when group blocked
Scott Nonnenberg c2e0ec5636 Group Blocking: Allow group metadata messages from own devices
Scott Nonnenberg 9c399624cc Support for blocking groups on mobile, via group/blocked syncs
sachaaaaa b7ca5562b2 remove debugging code that skips encryption
sachaaaaa fbf13e1873 make transmitMessage call loki_message_api.sendMessage instead of webapi::sendMessage
sachaaaaa bb65115d7d Ensure the unique object id is stored in the object to facilitate deleting it later.
sachaaaaa 2f562ce9e1 Change contact prekeys in db to allow multiple entries for each contact
sachaaaaa 0832806bd9 wip: added helper to create mock contacts, almost got a session working
sachaaaaa b84ff76faf Fix error handling when sending message + clean up in loki_message_api
sachaaaaa 8ada6ce8ad serialize message as base64
sachaaaaa 1e14022e2f Add skeleton for Loki Message API. Wrap data in json (for now?)
sachaaaaa 8f33419b52 Change pubkey representation to hex instead of base64
sachaaaaa 536908b1c4 Temporarily prevent re-connecting when socket is disconnected
sachaaaaa 4f3b036fee Skip decrypting messages coming from websocket (no client-server encryption)
Scott Nonnenberg 02fbea96c0 Move base64 conversions off of the main thread
Scott Nonnenberg 911bc63c67 Move all arrayBuffer<->base64 functions to be async
sachaaaaa 516f0a9916 Replace phone number with pubkey as identity. Remove unused keys and skip sending keys to server. ()
Scott Nonnenberg 15751f3521 MessageReceiver.queueAllCached: Give event loop a rest
We don't want to queue multiple hundreds of messages at once, so we
let the event loop catch up every 20 messages queued.
Scott Nonnenberg 0eb2c958a5 Handle contact: don't exit early if timer is 'invalid'
Scott Nonnenberg 7983300f4a Use base64 strings for incoming message cache instead of binary
Scott Nonnenberg 85ab4e567f Let server know that we failed to process message on cache error
Scott Nonnenberg 727925a266 Clean up old messages, better handle errors from sending
Scott Nonnenberg 52ee6abf52 Provide needed function to migration process
And disable attachment cleanup for now
Scott Nonnenberg 44dec45995 Ensure that all messages in cache are migrated properly
Scott Nonnenberg 59f955ff30 On error handling cached message, show error then delete
Scott Nonnenberg baf419b7b6 Ensure that we always enqueue in the same order received
Scott Nonnenberg 3105b77475 Migrate to SQLCipher for messages/cache
Quite a few other fixes, including:
  - Sending to contact with no avatar yet (not synced from mobile)
  - Left pane doesn't update quickly or at all on new message
  - Left pane doesn't show sent or error status

Also:
 - Contributing.md: Ensure set of linux dev dependencies is complete
Scott Nonnenberg 0774ba2903 Eslintify all of libtextsecure
Scott Nonnenberg 5933a34a18 Use window.log in browser context, turn on console eslint rule
Scott Nonnenberg f5852bb357 Be resilient to null thrown errors so we can surface to user
Scott Nonnenberg a40a39314a Disable notifications on new 'reconnect' event for laptop resume
Scott Nonnenberg 1c23c6a9d7 Remove window.config in favor of window.getXXX() accessors
Scott Nonnenberg f3bd0cf903 Refactor api.js into web_api, which encapsulates all web access
Scott Nonnenberg 37ebe9fcec eslintify libtextsecure/api.js
Scott Nonnenberg cfe0bd0e79 Move to npm for several dependencies
mustache
jQuery
underscore
backbone
mocha
chai
intl-tel-input
Scott Nonnenberg e02887565b
Update to electron v2.0.1 ()
* Remove extra parenthesis causing warnings on latest chromium

* Update to electron 2.0.1

* Move all @types dependencies to devDependencies

* Update electron-builder/electron-updater

* Update to Node.js 8.9.3 to match Electron 2.0.1
Scott Nonnenberg fffcba0fec Properly handle contact property as an array in MessageReceiver
Scott Nonnenberg 3ea3e4e256 Contact sharing: protos and data pipeline
As of this commit: 82b76ccf37
Daniel Gasienica ba4d8952c6 Revert "Use protocol buffer module for `libtextsecure`"
This does not work with `ArrayBuffer` out of the box and will need to be
investigated and tested more before switching.

Some APIs also seemed to have changed:
- Before (OOP): `new textsecure.protobuf.WebSocketMessage(…).encode();`
- After (functional):
  ```
  textsecure.protobuf.WebSocketMessage.encode(
    new textsecure.protobuf.WebSocketMessage(…)
  );
  ```

This reverts commit d758119d9de4f99742ea941e86180b1d600c2f22.
Daniel Gasienica 60077d0b7b Use protocol buffer module for `libtextsecure`