Commit Graph

37 Commits (e223db56d9cca4cc7533d0e017cb772662e447c5)

Author SHA1 Message Date
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
lilia 7c81e4ed2e Delete extra space 9 years ago
lilia d11f9fd538 Update libsignal-protocol v1.1.4
// FREEBIE
9 years ago
lilia 167f19153c Update libsignal-protocol v1.1.0
Moves padding operations to the service library.

// FREEBIE
9 years ago
lilia d89c3e8e86 Remove devices with no keys
// FREEBIE
9 years ago
lilia 89d3b772d5 Define UnregisteredUserError class
// FREEBIE
9 years ago
lilia 81dfdd959f Don't allow retry on unregistered user errors
// FREEBIE
9 years ago
lilia 055c0c323e Remove unneeded property from device object
// FREEBIE
9 years ago
lilia 58452066aa Move device storage methods to outgoing message
This is the only place they are called.

// FREEBIE
9 years ago
lilia d32a352d8a Use deviceIds/addresses instead of encodedNumbers
The getDeviceObjectsForNumber method returns device objects that contain
nothing but the encodedNumber property. Instead, just deal in deviceIds
until a SignalProtocolAddress is constructed to manage both the number
and deviceId.

// FREEBIE
9 years ago
lilia 95935f70ee Remove relay check from sendmessage
We don't currently store any relay information about devices,
and

// FREEBIE
9 years ago
lilia 0483fa2f97 Remove closeOpenSessionForDevice from protocol_wrapper
// FREEBIE
9 years ago
lilia 891ddacd35 Remove processPreKey from protocol_wrapper
Use SessionBuilder directly instead of protocol_wrapper

// FREEBIE
9 years ago
lilia 843036f0ce Remove getRegistrationId and encryptMessageFor from protocol_wrapper
We can now use protocol classes like SessionCipher directly because it
supports per-device read/write serialization internally.

// FREEBIE
9 years ago
lilia 56238136ca Remove trivial wrapper method
// FREEBIE
9 years ago
lilia 78cdc0cb52 Remove tempKeys
Now that we simply establish and save a session via SessionBuilder
rather than saving the keys to pass in during encrypt, we can stop
caching them in memory in between the identity key check and the
encryption step.

// FREEBIE
9 years ago
lilia 9f871db48a Update libsignal-protocol / Update prekey format
Integrates change in prekey object formatting, which now matches more
conveniently with the representation rendered by the server.

// FREEBIE
9 years ago
lilia b00d5289cf Save message timestamp for resending
Fix bug where resending due to failed network connection would fail
silently.

Broken in 7b6820 refactor which changed arguments to transmitMessage

// FREEBIE
9 years ago
lilia 5c37c3d6ce Change return type from sending messages
Pass the whole result from the outgoing message callback on to the
caller, and preserve the names of the members.

// FREEBIE
10 years ago
lilia 7b6820d2ac Refactor messageSender/OutgoingMessage
Move encrypt and transmit to OutgoingMessage
Restore per-number queueing to messageSender

// FREEBIE
10 years ago
lilia a52d35bb1b Refactor and fixup key requests
Fix a bad loop scope bug in getKeysForNumber by using forEach.
Refactor the initial process of establishing key material for devices
that do not have open sessions.

// FREEBIE
10 years ago
lilia b18cfd75de Check for device keys in memory before requesting more
// FREEBIE
10 years ago
lilia 2b9d039837 Serialize requests for keys
Fixes #383

// FREEBIE
10 years ago
lilia 01e85b68ef Handle exceptions when fetching keys for devices
It's rare that we get in a state where we have a device record without a
session, but we should handle errors gracefully in that case. Catch them
and register them, except for identity key errors which are registered
in handleResult.

// FREEBIE

fixup error handling // FREEBIE
10 years ago
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
10 years ago