Commit Graph

68 Commits (e6ff79c12689b9f49c044b55a773a8939848f768)

Author SHA1 Message Date
Matthew Chen e6ff79c126 Revert "Merge branch 'charlesmchen/autoMarkAsRead'"
This reverts commit 25e086c221, reversing
changes made to 77833e727a.
8 years ago
Matthew Chen 0936dd936b Don’t reply to “request group info” messages from non-members of the group in question.
// FREEBIE
8 years ago
Matthew Chen 8d10d19f8f Only reply to group info requester.
// FREEBIE
8 years ago
Matthew Chen 6e52009ff0 Rework the “disappearing messages” logic.
// FREEBIE
8 years ago
Matthew Chen d5118273b8 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 315775ff23 Auto-rejoin groups by emitting and responding to “request group info” messages.
// FREEBIE
8 years ago
Matthew Chen 2a64ff29e5 Temporary change to improve read receipt logging. 8 years ago
Michael Kirk 52b19a9118 better debug messages about what *kind* of encrypted message we received
Uniform logging, removing redundant logging wherever possible, to add
details about what kind of message was received.

In particular, with calls, when there are lots of messages going back
and forth, this makes it easier to make sense of what's being exchanged.

// FREEBIE
8 years ago
Matthew Chen 6686167cc3 Ignore oversize messages.
// FREEBIE
8 years ago
Michael Kirk a21108db5c Log message type in prod
// FREEBIE
8 years ago
Matthew Chen 0ab6bcd080 Rework outgoing message state.
// FREEBIE
8 years ago
Matthew Chen 42e005a498 Avoid lost messages by acknowledges message receipt after the message is processed.
// FREEBIE
8 years ago
Matthew Chen 0224af7465 De-bounce the prekey checks.
// FREEBIE
8 years ago
Michael Kirk bb38fce54e Ensure that deleting sessions happens on session queue
// FREEBIE
8 years ago
Michael Kirk 773b09b015 Inspect session store on serial queue
// FREEBIE
8 years ago
Michael Kirk 7578176e37 rename sessionCipher to sessionStoreQueue
// FREEBIE
8 years ago
Matthew Chen 723174e14e Respond to CR.
// FREEBIE
8 years ago
Matthew Chen d47ddd112d Filter outgoing messages using the blacklist.
// FREEBIE
8 years ago
Matthew Chen af4faaa601 Filter incoming messages using the blacklist.
// FREEBIE
8 years ago
Matthew Chen cd4134c9da Apply assert to ensure singletons are only created once.
// FREEBIE
8 years ago
Matthew Chen 02004a75f9 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen f036d75fcb Avoid redundant "block list changed" sync messages in TSBlockingManager.
// FREEBIE
8 years ago
Matthew Chen f5237ef5d1 Add TSBlockingManager.
// FREEBIE
8 years ago
Michael Kirk 61fe71f0ca MessageSender should be accessed as singleton
// FREEBIE
8 years ago
Michael Kirk b73594b234 Better envelop logging.
Previously it was basically impossible to trace recipients in debug
logs.

// FREEBIE
8 years ago
Matthew Chen 7f681e964b Improve logging around decryption exceptions.
// FREEBIE
8 years ago
Michael Kirk a92158ef16 CR: fix register `async` where specified
* fix thread test
* add IncomingMessageFinder test
* use constants
* clearer comments

// FREEBIE
8 years ago
Michael Kirk b389bb3bb8 Code cleanup.
No need to use contactThread method to get recipient ID since we still
have the envelope.

And with that, it's pretty easy to justify getting rid of one of our now
barely used IncomingMessage initializers.

// FREEBIE
8 years ago
Michael Kirk 975726e022 Dedupe incoming messags
// FREEBIE
8 years ago
Michael Kirk e0688e16a7 Clean up prekey logic.
// FREEBIE
8 years ago
Michael Kirk e1949893f2 Avoid deadlock when marking self-sent messages as read.
Fetching the localNumber invokes another transaction, which can
result in deadlock if called during an existing transaction.

// FREEBIE
8 years ago
Matthew Chen 284212b3fe Move OWSDispatch.h to the PCH.
// FREEBIE
8 years ago
Matthew Chen df1b3418d2 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 6d356e4b67 Automatically mark as read any messages sent by current user from another device.
// FREEBIE
8 years ago
Michael Kirk cf6f107f1e Merge remote-tracking branch 'origin/master' into mkirk/webrtc
Get session corruption fixes

// FREEBIE
8 years ago
Michael Kirk 5d863418ea Narrow the scope of code run on SessionCipher queue
And run all non-cipher code on the main thread.

Note: Running encryption on the sessionCipher queue is more about
serializing access to session mutations than it is about any performance
gains.

// FREEBIE
8 years ago
Michael Kirk d1aa253f87 WebRTC calling
* Stun server request
* settable TextSecureEnv
* nullability annotations for TSCall
* Better debug logging for message sending
* fixup tests and expiration time

// FREEBIE
8 years ago
Michael Kirk edebd14d42 Ignore messages with unknown Envelope.Contents
// FREEBIE
9 years ago
Russ Shanahan 7125028159 Rename an OWSContactsManager method
From nameStringForPhoneIdentifier
  To displayNameForPhoneIdentifier

* Add nullability descriptions

* Fix the mock object to adhere to new nullability rules

// FREEBIE
9 years ago
Michael Kirk 3083e2929c OWSContact from CNContact
Used in new contact picker for the Signal invite flow 

* populate emails
* nullability annotations

// FREEBIE
9 years ago
Michael Kirk df756423f2 Ignore unknown group messages
otherwise when (e.g.) android adds a new group type they'll be shown as
empty bubbles.

// 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
Matthew Douglass d4c55d6940 Maps numbers to names in TSGroupModel
* Maps numbers to names in TSGroupModel

Use an injected ContactsManager to look up proper user names for phone numbers in [TSGroupModel getInfoStringAboutUpdateTo].
Fixes WhisperSystems/Signal-iOS#757

* Supports custom messages for TSOutgoingMessage

This will enable Signal-iOS to push detailed information about TSGroupModel updates through SignalServiceKit and into the TSInfoMessage created by TSMessagesManager+sendMessages

// 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
Michael Kirk c1ade86a8b New fingerprint format
In coordination with Desktop and Android, iOS will be using all-numeric
fingerprints, aka "Safety Numbers".

Furthermore, the concept of verifying one identity and then the other
has been removed. Instead we ask users to exchange a single number, or
scan a single QR code. These credentials are built by combining the
users identities.

// FREEBIE
9 years ago
Michael Kirk 2dba7d141a Fix contact/group sync messages. (#32)
Initially we don't have device messages for our remote device. We need to send the empty device list to get the updated list of remote devices.

Introduced lots of dependency injection to make MessagesManager more testable.

// FREEBIE
9 years ago
Michael Kirk 1824af5335 Fixes: "unsupported attachment" when group is missing avatar (#31)
// FREEBIE
9 years ago
Michael Kirk a0df56a68e Fix multiple keychange errors (#29)
* Don't attempt to send a message unless we've successfully built a deveice-messages
* Only process message exception when we're done with retries.

// FREEBIE
9 years ago
Michael Kirk af155bf9ed Avoid deadlock when receiving read receipt before incoming message
// FREEBIE
9 years ago