Commit Graph

85 Commits (43de0cc2ec433f6fae7c26e01d7ae9e06ed855d7)

Author SHA1 Message Date
lilia 43de0cc2ec Add attachment digests
// FREEBIE
8 years ago
lilia 280f7a74b1 Fix key change errors while retrying key change errors 8 years ago
lilia 053bf20185 Group updates never have body or attachments
Why would they? And group.added isn't used anywhere else.

// FREEBIE
8 years ago
lilia d52050d43f Fix group timer updates 9 years ago
lilia 1da44c847b Fix handling sent messages sans expirationStartTimestamp 9 years ago
lilia 7eea88a545 Convert expirationStartTimestamp to number 9 years ago
lilia 448835e4d5 Bail early when processing timer updates
Also let expireTimer default to 0.
9 years ago
lilia 02ea4f2475 Use read receipt envelope to infer startExpirationTime
Avoids display of phantom messages that are only received and marked
read locally long after they have expired on another linked device.
9 years ago
lilia b3e932dce8 Add protocol support for disappearing messages 9 years ago
lilia 0487fa3cd1 Add server fallback port 8443
// FREEBIE
9 years ago
lilia f610233ef6 Add support for syncing blocked numbers
// FREEBIE
9 years ago
lilia 2cea499736 Reduce log noise from prekey messages
// FREEBIE
9 years ago
lilia c39d6687e5 Reduce log noise from delivery receipts
Stop logging envelope messages on receipts since we log the same info as
a receipt in background.js.

// FREEBIE
9 years ago
lilia 167f19153c Update libsignal-protocol v1.1.0
Moves padding operations to the service library.

// FREEBIE
9 years ago
lilia f216262298 Update libsignal-protocol v0.12.0
Moves version byte check to protocol lib.

// FREEBIE
9 years ago
lilia f16803018c Update libsignal-protocol v0.11.0
* Changes return type from decryption functions
* Update components

// FREEBIE
9 years ago
lilia d5f4665fa4 MessageReceiver uses SessionCipher to retry conflicts
// FREEBIE
9 years ago
lilia 9ecfe6acb0 Use SignalProtocolAddress in MessageReceiver constructor
// FREEBIE
9 years ago
lilia 050ea87aaf Get device ids instead of objects
// FREEBIE
9 years ago
lilia 0483fa2f97 Remove closeOpenSessionForDevice from protocol_wrapper
// FREEBIE
9 years ago
lilia 0d5ec60a7a Remove handlePreKeyWhisperMessage from protocol_wrapper
// FREEBIE
9 years ago
lilia 8010a09045 Remove decryptWhisperMessage from protocol_wrapper
// FREEBIE
9 years ago
lilia 6a928e3377 Fix reference error in MessageReceiver from fe82e4
Fix a reference error when resolving a key conflict on an incoming end
session message. See Signal-Android/5438.

// FREEBIE
9 years ago
lilia 7e2c6fd6bc Remove unused argument
// FREEBIE
9 years ago
lilia 6053fe67ba Use built-in string conversion on protobuf
In lieu of a global helper.

// FREEBIE
9 years ago
lilia 781ada64ca Add libtextsecure support for syncing read messages
Plumbing for sending and receiving a new sync protobuf for marking
messages read on/from my other devices.

// FREEBIE
9 years ago
lilia 010297f4c5 Track groups I've left
// FREEBIE
9 years ago
lilia b73a3aea80 Fix syntax error
// FREEBIE
9 years ago
lilia cee2b3163a Add missing bind in messageReceiver
// FREEBIE
9 years ago
lilia 7dcad67410 Fix handleSentMessage
Missing a bind in 27fe7e3.

// FREEBIE
9 years ago
lilia 27fe7e355e Process end session flags in sync messages
Because remote clients will delete all sessions in response to an end
session message, regardless of which device it came from, when our
linked device sends an end session message, we must also end all
sessions with the destination.

This change moves the end session flag processing to processDecrypted,
which is shared between handlers of sent messages, data messages, and
messages which are re-tried after resolving identity conflicts.

// FREEBIE
9 years ago
lilia fe82e469f2 Make end session consistent with android
Close all the sessions for a number when receiving an end session
message.

// FREEBIE
9 years ago
lilia 86132a38a8 Log envelopes and session end events
Help debug bad session errors by logging some envelope info about the
message we are about to decrypt. With this, if there is a decryption
error (e.g., bad mac or no session) it is clear from the logs what
number and device message sent the bad message.

Also log when we send and receive end session messages and when we close
sessions for certain devices.

// FREEBIE
9 years ago
lilia 1b68e652cc Fire group sync completion event despite errors
Sometimes an error is thrown while processing groups from a group sync
message. We still want to fire the groupsync event when we're done
handling all the data, even if some of it was bad.
9 years ago
lilia f7c4fd2fed DRY up event target implementations
Dedupe event target code and make it extensible.

// FREEBIE
9 years ago
Karel Bilek d8381cfc47 Dispatch an event after processing a group sync
Related #521
9 years ago
lilia 96520e9fd4 Move envelope decode before ack
We should not ack envelope protobufs that fail to decode correctly. If
the server happens to send us such a thing it probably indicates a
protocol mismatch between it and the client, in which case the client
needs to update and re-receive the failed message.

// FREEBIE
9 years ago
lilia 44824df6cb Refactor for clarity
// FREEBIE
9 years ago
Matt Corallo dac084b604 Send message ACKs immediately after recv, instead of after process 9 years ago
lilia 093eb001ff Correct log statement
Although in practice, these timestamps are often the same, they needn't
be, and when they aren't, we want the sentMessage.timestamp here.

// FREEBIE
9 years ago
lilia d95f869d62 More logging
// FREEBIE
9 years ago
lilia d201c65f7c More verbose logging in message receiver
// FREEBIE
9 years ago
lilia 2f469835d9 Handle group quit sync messages
Previously, we would incorrectly reject group updates originating from a
linked device instructing us to remove ourselves from the group.

// FREEBIE
9 years ago
lilia 4cc6b1ff9a Validate attachment urls
// FREEBIE
10 years ago
lilia 847fa43520 Save group members when creating groups from non-updates
Follow up to b0da4910. When inferring membership of the sender in an
unknown group, remember to save and return the group members.

Generally, this should only effect standalone clients unless someone
managed to clear their groups db table, since linked clients get group
info synced at registration.

// FREEBIE
10 years ago
lilia 675be2b569 Don't reconnect if close was called
Fixes a bug during re-registration where we continue to re-open
the socket using old credentials.

// FREEBIE
10 years ago
lilia ec6898f1ab Process incoming messages in order
This may increase processing latency a bit, particularly with large
attachments, but will ensure that messages are dispatched in the order
they are received.

It would be nice to enforce ordering on only the dispatch step, so that
we could, for example, decrypt the next websocket message while waiting
for an attachment to download, but that will require a more complicated
refactor. Will stick with the quick fix for now and revisit later.

Fixes #342

// FREEBIE
10 years ago
lilia 9be5efc571 Simplify keepalive resets
Websocket resources should have their keepalive timers reset whenever a
message comes in. This is a nicety that slightly reduces the amount of
traffic we send when actively messaging.

Previously this was handled by MessageReceiver, but it's a bit cleaner
to just have the WebsocketResource add an extra 'message' event handler.

// FREEBIE
10 years ago
lilia 1345899253 Use reject instead of throw
This ensures that the containing promise is rejected without triggering
the side effects of an uncaught exception, such as causing the debugger
to pause.

// FREEBIE
10 years ago
lilia b0da491025 Don't throw on unknown groups
// FREEBIE
10 years ago