Commit Graph

74 Commits (7887786b007df25d33bdc01f054ea2e761c4edec)

Author SHA1 Message Date
BeaudanBrown 9ceb3c8ac0
Merge branch 'development' into message-polling 7 years ago
Beaudan c59b196487 Now reading messages and adding them to conversations. Some cleaning of unreachable code. Modified the message data to be encoded as base64 string before sending to server
Sending our public key in header of message

Now attaching our key to the source field when sending messages, allows messages to be decrypted with the fallback cypher

Now polling the server for messages every 5 seconds

Sending the source device with messages

Added mock respond function to request to leave it that same as the websocket stuff. RetrieveMessages now just returns the result

Polling now continues if the server responds with an error. Returning only the result from sendMessage and retrieveMessages

Revert commenting of unreachable code

Refactored http logic into own file

Revert a change to websocket-resources
7 years ago
Mikunj 2fabd93fd6 Fix message sending 7 years ago
Mikunj 77602e3dbb Moved contactPreKey and contactSignedPreKey to sql. 7 years ago
Mikunj f589fdac5c Merge signal changes into branch. 7 years ago
sachaaaaa dda71cbea1 always lock editor after sending friend request. unlock if error. 7 years ago
sachaaaaa 4b9fcb98d4 Linting and other housekeeping stuff 7 years ago
sachaaaaa 13858dfa66 yarn.lock and fix missing variable in transmission error handling 7 years ago
sachaaaaa 143b1e883d
Merge pull request #17 from sachaaaaa/lock_input_friend_request
Lock input after friend request is sent
7 years ago
sachaaaaa 1cf8710127
Merge pull request #16 from sachaaaaa/friend_response
Handle prekeys in incoming friend request
7 years ago
Beaudan d9c89376cb Added logic to pass tll into transmitMessage function, with default value of 24 hours.
TODO: ensure that the target calculation for the PoW is adjusting appropriately for the different ttl values.
7 years ago
sachaaaaa fb020f88ea call 'onFriendRequestSent' only after the message was successfully sent 7 years ago
sachaaaaa 93f1534512 Save prekeys upon reception of friend request. Add function to send an empty message as friend request acceptance 7 years ago
sachaaaaa b9dbf11ebc Fix various things from previous commits 7 years ago
sachaaaaa 5602f4bfff Change placeholder in discussion 7 years ago
sachaaaaa d4d0d05adf Lock text input while waiting for friend request reply 7 years ago
sachaaaaa 886f47b8e7
Prekeys sending: first pass (#12)
* add 'recipient' attribute in prekey database to allow binding a prekey to a recipient pub key

* Attach a PreKeyBundleMessage to the ContentMessage in fallback encryption mode

* Skip generating 100 prekeys upon registration

* Store the signed key signature in database
7 years ago
sachaaaaa 9677f8b648
Merge branch 'development' into send_as_bytes 7 years ago
sachaaaaa be29ea725a revert libsignal-protocol and convert binary-encoded string to Uint8Array later down the line 7 years ago
sachaaaaa 6fe70b9b85 Send outgoing messages as raw bytes (Uint8Array) and moved recipient & ttl to header 7 years ago
sachaaaaa 9da4e94276 print outgoing messages as bytes, that can be injected in the mock socket server for debugging 7 years ago
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 7 years ago
sachaaaaa 5e9f4177ff style nits 7 years ago
sachaaaaa d6954aa91c Wrap outgoing message in a WebSocketMessage proto object to match incoming format 7 years ago
sachaaaaa 42e941531f Add fallback encryption (FallBackSessionCipher. simple DH) for when key bundle hasn't been received yet. Skip padding of bytes. 7 years ago
sachaaaaa b7ca5562b2 remove debugging code that skips encryption 7 years ago
sachaaaaa fbf13e1873 make transmitMessage call loki_message_api.sendMessage instead of webapi::sendMessage 7 years ago
sachaaaaa 0832806bd9 wip: added helper to create mock contacts, almost got a session working 7 years ago
sachaaaaa b84ff76faf Fix error handling when sending message + clean up in loki_message_api 7 years ago
sachaaaaa 8ada6ce8ad serialize message as base64 7 years ago
sachaaaaa 1e14022e2f Add skeleton for Loki Message API. Wrap data in json (for now?) 7 years ago
Scott Nonnenberg 0774ba2903 Eslintify all of libtextsecure 7 years ago
Scott Nonnenberg 5933a34a18 Use window.log in browser context, turn on console eslint rule 7 years ago
Scott Nonnenberg a0ed993b42 Now we've got everything prettified! 7 years ago
Daniel Gasienica 95321e5d3e Remove Vim mode lines 7 years ago
Lilia 52cc8355a6 Feature: Blue check marks for read messages if opted in (#1489)
* Refactor delivery receipt event handler

* Rename the delivery receipt event

For less ambiguity with read receipts.

* Rename synced read event

For less ambiguity with read receipts from other Signal users.

* Add support for incoming receipt messages

Handle ReceiptMessages, which may include encrypted delivery receipts or read
receipts from recipients of our sent messages.

// FREEBIE

* Rename ReadReceipts to ReadSyncs

* Render read messages with blue double checks

* Send read receipts to senders of incoming messages

// FREEBIE

* Move ReadSyncs to their own file

// FREEBIE

* Fixup old comments on read receipts (now read syncs)

And some variable renaming for extra clarity.

// FREEBIE

* Add global setting for read receipts

Don't send read receipt messages unless the setting is enabled.
Don't process read receipts if the setting is disabled.

// FREEBIE

* Sync read receipt setting from mobile

Toggling this setting on your mobile device should sync it to Desktop. When
linking, use the setting in the provisioning message.

// FREEBIE

* Send receipt messages silently

Avoid generating phantom messages on ios

// FREEBIE

* Save recipients on the outgoing message models

For accurate tracking and display of sent/delivered/read state, even if group
membership changes later.

// FREEBIE

* Fix conversation type in profile key update handling

// FREEBIE

* Set recipients on synced sent messages

* Render saved recipients in message detail if available

For older messages, where we did not save the intended set of recipients at the
time of sending, fall back to the current group membership.

// FREEBIE

* Record who has been successfully sent to

// FREEBIE

* Record who a message has been delivered to

* Invert the not-clickable class

* Fix readReceipt setting sync when linking

* Render per recipient sent/delivered/read status

In the message detail view for outgoing messages, render each recipient's
individual sent/delivered/read status with respect to this message, as long as
there are no errors associated with the recipient (ie, safety number changes,
user not registered, etc...) since the error icon is displayed in that case.

*Messages sent before this change may not have per-recipient status lists
and will simply show no status icon.

// FREEBIE

* Add configuration sync request

Send these requests in a one-off fashion when:
  1. We have just setup from a chrome app import
  2. We have just upgraded to read-receipt support

// FREEBIE

* Expose sendRequestConfigurationSyncMessage

// FREEBIE

* Fix handling of incoming delivery receipts - union with array

FREEBIE
8 years ago
Scott Nonnenberg 7e8f3ab5e7
Fix for "Can't find record for undefined.1"
Also, we didn't need to recalculate the number here anyway!

FREEBIE
8 years ago
Scott Nonnenberg e223db56d9 Set messageKeysLimit to unlimited if communicating with our devices (#1348)
Set messageKeysLimit to unlimited if communicating with our devices

FREEBIE
8 years ago
Scott Nonnenberg 224140c911 OutgoingMessage: Provide proper timestamp for replayability
FREEBIE
8 years ago
Scott Nonnenberg 5d1150e5bc Fix call to reloadDevicesAndSend - it returns a function
FREEBIE
8 years ago
Scott Nonnenberg 4ee4ad80c3 Message.send - check for missing identityKey, also add logging
FREEBIE
8 years ago
Scott Nonnenberg 551aa24e9a OutgoingMessage: A few code style tweaks to make things readable
FREEBIE
8 years ago
Scott Nonnenberg 116e4d2eeb OutgoingMessage: Reduce the calls to registerError
In some cases, due to promise chaining and error propagation, we were
calling registerError more than once for a given error. This would then
cause the overall callback for the send operation to be called with a
partial set of errors, as well as duplicates.

Note: we do need to find a way to attach identityKey to the
OutgoingIdentityKeyError in the case where it comes directly from the
encrypt() instead of our pre-key operations.

FREEBIE
8 years ago
lilia 4232f5711c Handle identity key change errors on encrypt
We need to capture key change errors from the protocol library when we call
encrypt. Previously we would only see these on session init.

// FREEBIE
8 years ago
lilia 3afe378063 Remove legacy property from OutgoingMessage 8 years ago
lilia d47ced1199 Don't recompute outgoing message padding
We can use the same padded plaintext across multiple numbers or attempts rather
than re-creating it every time we encrypt to a particular number.

// FREEBIE
8 years ago
lilia 30201969be Inline some functions in OutgoingMessage
Since we no longer have legacy messages to send, we can simplify things a bit
here.

// FREEBIE
8 years ago
lilia e8548879db Stop sending legacy DataMessages 8 years ago
lilia 0fac2e1d68 Log when we see a 0 registrationId
Most likely an indicator that the device we're dealing with is a 3rd
party client.

// FREEBIE
8 years ago
haffenloher d2ddfc72e4 Throw UnregisteredUserErrors in getKeysForNumber() 8 years ago