Commit Graph

4873 Commits

Author SHA1 Message Date
Matthew Chen
e2c2f37e60 Respond to CR. 2020-08-11 17:25:47 -03:00
Matthew Chen
4fab1f7e09 Fix issue in address' Codable impl. 2020-08-11 16:44:32 -03:00
Matthew Chen
b85cc48017 Add unit test around address mapping changes. 2020-08-11 16:44:32 -03:00
Matthew Chen
9e62160abe Fix perf problems around observation of addressing mapping changes. 2020-08-11 16:44:32 -03:00
Matthew Chen
88f17077f6 Update remote config custom flag name. 2020-08-11 13:56:16 -03:00
Michelle Linington
2773e28561 Run precommit linter 2020-08-10 18:47:58 -07:00
Michelle Linington
41e95f2447 Fixup from rebase 2020-08-10 18:47:58 -07:00
Michelle Linington
8372df787d Migrate modernContactDiscovery from featureflag to remoteflag
This changes up some of the logic around how we determine whether or not
to enable modern contact discovery
2020-08-10 18:47:58 -07:00
Michelle Linington
8211c73459 IOS-716: Introduce remote feature flag for modern CDS
Adds a new RemoteConfig flag to enable modern contact discovery. The
rules are:
- FeatureFlags.modernContactDiscovery is a prerequisite
- RemoteConfig.modernContactDiscovery or
  DebugFlags.forceModernContactDiscovery will enable modern CDS
2020-08-10 18:47:58 -07:00
Matthew Chen
eb6f43cf07 Rework maxGroupsV2MemberCount remote config flag. 2020-08-10 19:46:23 -03:00
Matthew Chen
4a1e6a07ea Fix edge case in model read cache. 2020-08-10 17:33:33 -03:00
Matthew Chen
6c569b1cf2 Fix edge case in model read cache. 2020-08-10 17:28:42 -03:00
Matthew Chen
fbf18ae0dc Refine UD edge case. 2020-08-10 17:25:58 -03:00
Matthew Chen
abc79b44e0 Avoid redundant writes. 2020-08-10 17:24:43 -03:00
Matthew Chen
0446dd5149 Improve UD manager perf. 2020-08-10 17:24:43 -03:00
Matthew Chen
ad6a46b3b3 Improve UD manager perf. 2020-08-10 17:24:43 -03:00
Matthew Chen
2b8ff7d8cb Improve UD manager perf. 2020-08-10 17:24:43 -03:00
Matthew Chen
b4d5f29be1 Handle empty message bodies. 2020-08-10 11:48:23 -03:00
Matthew Chen
83e0f649ac Respond to CR. 2020-08-10 11:47:37 -03:00
Matthew Chen
0808cbc3ce Fix edge case around file cleanup. 2020-08-10 11:45:28 -03:00
Matthew Chen
1442e37363 Fix edge case around file cleanup. 2020-08-10 11:45:28 -03:00
Matthew Chen
4869517391 Respond to CR. 2020-08-10 11:42:53 -03:00
Matthew Chen
162eea5aa2 Tune frequency of UI database snapshot updates. 2020-08-10 11:38:36 -03:00
Matthew Chen
c4b16ebb1e Add remove config flag for UUID-based safety numbers. 2020-08-07 17:53:38 -03:00
Matthew Chen
a6d832a5f5 Refine stale profile fetch. 2020-08-07 17:44:11 -03:00
Matthew Chen
9cdff9728d Add Fair and Unfair atomics. 2020-08-07 17:42:05 -03:00
Matthew Chen
b9b185c433 Avoid firing profile change notifications in response to changes to lastFetchDate. 2020-08-07 17:38:25 -03:00
Matthew Chen
667250e118 Fix perf of signal address sorting. 2020-08-07 17:19:19 -03:00
Matthew Chen
36baf6f5ab Fix perf of signal account sorting. 2020-08-07 17:19:19 -03:00
Nora Trapp
cfe9862d94 Mentions Remote Flag 2020-08-07 17:16:35 -03:00
Matthew Chen
c3b8fbd612 Rework sending of group update messages. 2020-08-07 16:59:13 -03:00
Matthew Chen
ebb40f84a7 Respond to CR. 2020-08-06 22:35:37 -03:00
Matthew Chen
a8cf29c6c5 Ensure model cache robust to UUID mapping edge cases. 2020-08-06 22:27:45 -03:00
Matthew Chen
9daa11518d Ensure model cache robust to UUID mapping edge cases. 2020-08-06 22:27:45 -03:00
Matthew Chen
59f1e9a9d1 Ensure model cache robust to UUID mapping edge cases. 2020-08-06 22:27:45 -03:00
Matthew Chen
aff2c6684a Ensure model cache robust to UUID mapping edge cases. 2020-08-06 22:27:45 -03:00
Michelle Linington
cbfb410fa8 Update to new SignalServiceAddress initializers post-rebase 2020-08-06 12:59:21 -07:00
Michelle Linington
3f746368cd PR feedback:
- Adjust how clients provide QoS information to ContactDiscoveryTask
- Fix an issue where legacy CDS was reporting a generic server failure
  as a result of network failures.
- ContactDiscoveryTask will no longer error on an empty set
- Remove CDSFeedback operation
2020-08-06 12:57:39 -07:00
Michelle Linington
fc74805e6a Fix up some log statements 2020-08-06 12:57:39 -07:00
Michelle Linington
fc5ac739aa Move everything to the new ContactDiscoveryTask
UUIDBackfillTask and OWSMessageSender were initializing
ContactDiscoveryOperations themselves and rolling their own database
update logic. Instead, they should be leveraging ContactDiscoveryTask.
2020-08-06 12:57:39 -07:00
Michelle Linington
8b5eb23260 Migrate ContactDiscoveryOperations to Promises
ContactDiscoveryOperations now return Promises and is no longer a
subclass of OWSOperation.

LegacyContactDiscoveryOperation needed some small changes, but was not
relying on dependent operations, so there wasn't anything too
significant.

ModernContactDiscoveryOperation was already using Promises in its
implementation. It required surfacing that promise. Dependent operations
are now represented in an array of sub-promises that are all joined
before completing. CDSBatchOperation was removed.

This change also makes everything that's not ContactDiscoveryTask
non-objc and non-public. Callers should really be using
ContactDiscoveryTask anyway.
2020-08-06 12:55:32 -07:00
Michelle Linington
a660a81d0f IOS-668: Reorganize how ContactsUpdater interacts with CDS operations
- Removes ContactsUpdater singleton. It wasn't really tracking much
  state anyway
- Introduces ContactDiscoveryTask. This creates a
  ContactDiscoveryOperation (modern or legacy) and updates the
  SignalRecipients database on completion. Returns a promise.
- Begin migrating away from operation queues

PromiseKit is weird about priority propogation, so this shouldn't be
used yet. Since all then closures are asynced, priorities don't
propogate down to underlying queues. This means the a
ContactDiscoveryTask on the main queue will not boost the priority on
the ModernContactDiscoverOperation's owned operation queue
2020-08-06 12:55:32 -07:00
Nora Trapp
cb3fe88e1b Fix mentions in sent transcripts 2020-08-06 09:58:12 -07:00
Matthew Chen
a0f4795421 Clean up ahead of PR. 2020-08-06 11:23:16 -03:00
Matthew Chen
3255fc3dfe Add pending members. 2020-08-06 11:23:16 -03:00
Matthew Chen
f5501b3a70 Improve handling of local user and uuid mapping edge cases. 2020-08-06 11:04:15 -03:00
Matthew Chen
bf38bcc44d Improve handling of local user and uuid mapping edge cases. 2020-08-06 11:04:15 -03:00
Nora Trapp
080adcae01 Fix ensureAccountId 2020-08-05 14:37:34 -07:00
Nora Trapp
9696671f8a Add trustLevel to SignalServiceAddress 2020-08-05 14:36:43 -07:00
Matthew Chen
87a704850d Update groupsV2maxMemberCount. 2020-08-05 16:27:22 -03:00