Commit Graph

10 Commits (0df5ea3ee50a15922b403914056e3890bd02ff5e)

Author SHA1 Message Date
Michael Kirk 0df5ea3ee5 CR: continue to delete session when receiving an EndSession
// FREEBIE
9 years ago
Michael Kirk 1db9c8b344 prefer archiving vs deleting sessions.
This gives us a little resiliency to handling messages out of order
across key change.

We still *always* print SN when they change.
And we still verify that the session used for encrypt/decrypt is the trusted
session

// FREEBIE
9 years ago
Matthew Chen 6e52009ff0 Rework the “disappearing messages” logic.
// FREEBIE
9 years ago
Michael Kirk e1055c26a3 Sync EndSession messages to linked devices
Alternatively, I considered deleting *only* the session with the device
which sent the message, but since other clients are deleting *all*
sessions associated with the contact, it will be less disruptive to get
in line with their behavior.

Fixes the scenario wherein:

* Alice.1 has a session with Bob.1 and Bob.2
* Bob.1 sends an EndSession to Alice
* Thus Alice.1 deletes her sessions with Bob.1 and Bob.2
* Bob.2 sends Alice1 "hi" (with the existing session - as a regular WM,
not a PKWM)
* Alice has no session with Bob.2 so cannot decrypt the message.

// FREEBIE
9 years ago
Matthew Chen a3db112c50 Fix outgoing message status for messages sent from linked devices.
// FREEBIE
9 years ago
Matthew Chen 654ef89049 Rework outgoing message state.
// FREEBIE
9 years ago
Matthew Chen 0ab6bcd080 Rework outgoing message state.
// FREEBIE
9 years ago
Michael Kirk 4ba1e86ec1 Explain send failures for text and media messages
Motivation
----------
We were often swallowing errors or yielding generic errors when it would
be better to provide specific errors.

We also didn't create an attachment when attachments failed to send,
making it impossible to show the user what was happening with an
in-progress or failed attachment.

Primary Changes
---------------
- Funnel all message sending through MessageSender, and remove message sending
  from MessagesManager.
  - Record most recent sending error so we can expose it in the UI
  - Can resend attachments.
  - Update message status for attachments, just like text messages
- Extracted UploadingService from MessagesManager
  - Saving attachment stream before uploading gives uniform API for send vs.
    resend
  - update status for downloading transcript attachments
- TSAttachments have a local id, separate from the server allocated id
  This allows us to save the attachment before the allocation request. Which is
  is good because:
  1. can show feedback to user faster.
  2. allows us to show an error when allocation fails.

Code Cleanup
------------
- Replaced a lot of global singleton access with injected dependencies to make
  for easier testing.
- Never save group meta messages. Rather than checking before (hopefully) every
  save, do it in the save method.
- Don't use callbacks for sync code.
- Handle errors on writing attachment data
- Fix old long broken tests that weren't even running. =(
- Removed dead code
- Use constants vs define
- Port flaky travis fixes from Signal-iOS

// FREEBIE
9 years ago
Michael Kirk 34868b9b0f fix captions in groups and sync messages (#42)
* Fix incoming group caption for groups.
* sync message transcript captions are expired

// FREEBIE
9 years ago
Michael Kirk 40cdc7f224 disappearing messages
* Support for disappearing messages
* update inbox thread preview when receiving message

// FREEBIE
9 years ago