Commit Graph

4736 Commits

Author SHA1 Message Date
Matthew Chen
4db7dd5ca3 Refine scaffolding for testing gv2. 2020-07-27 17:04:26 -03:00
Nora Trapp
a4673cc86a Fix group v1 membership for desktop 2020-07-27 11:38:12 -07:00
Matthew Chen
49397a55b3 Small fixes. 2020-07-27 14:08:59 -03:00
Matthew Chen
d4b9e778f5 Update debug name list. 2020-07-27 11:15:20 -03:00
Matthew Chen
7b59452e54 Update account attributes after changes to long form of app version. 2020-07-27 09:42:41 -03:00
Matthew Chen
c87b32619d Update account attributes after changes to long form of app version. 2020-07-27 09:42:41 -03:00
Matthew Chen
4a147c83d4 Tweak the "apply group change" logic. 2020-07-24 17:49:46 -03:00
Matthew Chen
b7be96304f Respond to CR. 2020-07-24 17:45:43 -03:00
Matthew Chen
b9bbaf9d6a Ensure message request is dismissed if necessary. 2020-07-24 17:31:17 -03:00
Matthew Chen
2cbd565af3 Clean up ahead of CR. 2020-07-24 17:31:17 -03:00
Matthew Chen
30740b5d80 Clean up ahead of CR. 2020-07-24 17:31:17 -03:00
Matthew Chen
1c8c0b7d5b Only auto-whitelist new groups if we were just added by a member who is in our system contacts or profile whitelist. 2020-07-24 17:31:17 -03:00
Matthew Chen
03a6cbd45b Use block mode when blocking threads. 2020-07-24 17:31:17 -03:00
Matthew Chen
e4a00f5584 Rework message requests for v2 groups. 2020-07-24 17:31:17 -03:00
Nora Trapp
fbd2ded8be Resolve merge conflict 2020-07-24 13:18:48 -07:00
Nora Trapp
f3b5d882c2 Group v1 state operates only in e164 2020-07-24 13:15:32 -07:00
Nora Trapp
d536c8ded0 PR Feedback 2020-07-24 13:15:32 -07:00
Nora Trapp
dde6f0bc59 Add tests around uuid <-> phone number mapping changes 2020-07-24 13:15:32 -07:00
Nora Trapp
b55a013e62 A bear bones pass at updating the cache/ui after a uuid <-> phone number mapping change 2020-07-24 13:15:02 -07:00
Nora Trapp
a2021426ef Update SignalServiceAddressCache when uuid <-> phone number mapping changes 2020-07-24 13:15:02 -07:00
Nora Trapp
5b373e4fee Handle when UUID <-> phone number mapping changes 2020-07-24 13:15:02 -07:00
Matthew Chen
80997f382f Fix feature flags. 2020-07-23 17:23:36 -03:00
Michelle Linington
7e1345d7d2 PR Feedback: Mark recipients as unregistered earlier
Nora suggested that we also explicitly mark unregistered recipients as
unregistered in response to the message send preparation
ContactDiscoveryOperation.

Also, she found an opportunistic fix to remove the TSInfoMessage on
unregistered recipient failures. This isn't the behavior we want anyway.
2020-07-22 21:27:22 -07:00
Michelle Linington
2b8b716839 Run precommit linter 2020-07-22 21:27:22 -07:00
Michelle Linington
b95df2f5d2 PR feedback: Rethink of message send flow
Changes when we perform a CDS lookup for any phone-number-only
recipients. Now, we do the CDS lookup in a preparation phase prior to
performing the message send.

This also moves some of the error handling within the individual
OWSMessageSend handlers. Now, unregistered recipient handling is
factored out into its own method. _sendMessageToRecipient: will
considered the recipient unregistered if it's missing a UUID.
2020-07-22 21:27:22 -07:00
Michelle Linington
b276e8eb02 IOS-445: Do CDS lookup during message send for recipients without UUID
This adds a new async operation in the message send flow. MessageSender
will now verify that the intended recipients of a message all have UUIDs
before proceeding. If any recipients are missing a UUID, it'll kick off
a CDS lookup for the invalid recipients.

While this code appears to work, this is a first pass. Looking to get
some inital feedback in a pull request. It's unclear to me whether or
not this pattern fits in with the existing error propogation flow in
MessagSender promises. It's also unclear whether or not the error I'm
using is correct.

Some other changes that come along for the ride:
- Add a -perform() method to ContactDiscoveryService to automatically
  submit itself and its dependencies to its static operation queue
2020-07-22 21:27:22 -07:00
Michelle Linington
a967bb12bc PR Feedback:
- Matthew suggested moving all polite readiness blocks to their
  impolite variants. There shouldn't be ordering concerns and message
  processing is important enough to be run impolitely.

- Nora suggested moving some of the message processing checks into
  MessagePipelineSupervisor. Some of the more complex checks like
  registration are out of scope of this change. But -[AppContext
  shouldProcessIncomingMessages] is a minor enough change to include.
  Now, -shouldProcessIncomingMessages is a precondition for
  -isMessageProcessingPermitted

- Matthew suggested that GRDB failures should be fatal. So instead,
  AnySignalRecipientFinder will try! instead of try?.

- Matthew suggested moving some of the MessagePipelineSupervisor
  logging statements to be lower priority.
2020-07-22 21:10:27 -07:00
Michelle Linington
95575ca19b Adds a whole bunch of tests for MessagePipelineSupervisor
- Adopt a local dependency property to fit in with existing style
- Unregister from pipeline supervision in some pipeline stages. This
  usually shouldn't matter since they're all singletons/children of
  singletons. I've only added this to classes that are already
  unregistering existing observations, or don't have any existing
  observations. Anything that was registering and not unregistering,
  I've left as is.
2020-07-22 21:10:27 -07:00
Michelle Linington
e3e903a8ad IOS-631: Suppress message processing pipeline while we have a pending backfill operation
Creates a new root singleton: OWSMessagePipelineSupervisor

As of right now, this singleton has two responsibilities:
- Track all message processing pipeline stages that have registered
  themselves
- Post processing suspension updates to interested stages

Four classes will now register themselves as pipeline stages:
- OWSMessageContentQueue
- YAPDBMessageDecryptQueue
- IncomingGroupsV2MessageQueue
- SSKMessageDecryptJobQueue

At initialization, OWSMessagePipelineSupervisor will take out a pipeline
suspension while it waits for a UUIDBackfillTask to complete. Other
interested objects are also able to suspend the message processing
pipeline by invoking suspendMessageProcessing(for:) on the supervisor
(though, currently this is not used by anything except tests)

This also adds some supporting improvements to UnfairLock. Now,
UnfairLock closures will return the value returned from its critical
section closure.
2020-07-22 21:10:27 -07:00
Nora Trapp
f2d96d02ec Maintain unknown fields when updating storage records 2020-07-22 14:43:24 -07:00
Nora Trapp
c5214e38b6 Add Codable adherance to proto wrappers 2020-07-22 14:34:24 -07:00
Nora Trapp
c4111f59d0 Generate interface for unknownFields 2020-07-22 14:34:24 -07:00
Nora Trapp
ee9a56dc4b Clean up orphaned accounts from storage service 2020-07-22 14:33:07 -07:00
Matthew Chen
153dffac23 Allow debug and internal builds to use gv2 without CDS. 2020-07-22 13:28:57 -03:00
Matthew Chen
9db8e72d52 Re-apply current revision when updating v2 groups in some cases. 2020-07-22 13:05:38 -03:00
Matthew Chen
639c6a17ee Add remote config for modern CDS and groups v2. 2020-07-22 13:04:33 -03:00
Matthew Chen
c14cc341c4 Add remote config for modern CDS and groups v2. 2020-07-22 13:04:33 -03:00
Matthew Chen
269309de01 Add remote config for modern CDS and groups v2. 2020-07-22 13:04:33 -03:00
Matthew Chen
597486f54a Add MVP legacy group indicator. 2020-07-22 11:49:59 -03:00
Nora Trapp
30e89998da Merge branch 'release/3.13.2' 2020-07-19 15:00:54 -07:00
Nora Trapp
7e0eeb07b1 Feature flags for .qa. 2020-07-17 12:55:10 -07:00
Nora Trapp
b0de119e6d Feature flags for .production. 2020-07-17 12:55:03 -07:00
Nora Trapp
f2fd6d9fcc Feature flags for .qa. 2020-07-17 12:04:25 -07:00
Nora Trapp
acdfa06dbe Feature flags for .production. 2020-07-17 11:58:21 -07:00
Nora Trapp
cbb7504abd Fix rare crash when rendering profile name changes 2020-07-17 11:58:12 -07:00
Nora Trapp
ba994e67af Feature flags for .qa. 2020-07-16 16:49:08 -07:00
Nora Trapp
2f0cee3de3 Feature flags for .production. 2020-07-16 16:48:45 -07:00
Michelle Linington
d396f99a16 IOS-662: Update staging enclave ID
The staging enclave code was updated to support rate-limiting. Updates
our staging constant to point to the new ID.
2020-07-16 14:54:02 -07:00
Nora Trapp
2400c680c1 Feature flags for .qa. 2020-07-15 20:18:39 -07:00
Nora Trapp
6dfc1d04dd Merge branch 'release/3.13.2' 2020-07-15 19:25:39 -07:00