Commit Graph

4740 Commits

Author SHA1 Message Date
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
Matthew Chen
1b038b60fc Respond to CR. 2020-08-05 14:28:15 -03:00
Matthew Chen
510200a880 Respond to CR. 2020-08-05 14:28:15 -03:00
Matthew Chen
1ba6d84003 React with thumbs up. 2020-08-05 14:28:14 -03:00
Nora Trapp
cd23769aa6 Resolve Storage Service profile name churn 2020-08-05 10:22:59 -07:00
Nora Trapp
5dce3079e6 evacuateAllCaches in transaction completion block 2020-08-04 20:19:10 -07:00
Nora Trapp
d4e94fad03 evacuateAllCaches sync 2020-08-04 20:16:35 -07:00
Nora Trapp
e72214d6ea Fix an issue with SignalRecipient and SignalAccount ModelReadCaches 2020-08-04 19:57:07 -07:00
Nora Trapp
222a0308de Warm the SingalServiceAddressCache earlier 2020-08-04 19:56:42 -07:00
Nora Trapp
9177be9828 Update the SignalServiceAddressCache when the local address changes 2020-08-04 19:56:21 -07:00
Michelle Linington
d635458bf7 PR Feedback
Enable modern CDS in qa builds instead of internalPreview
2020-08-04 15:49:12 -07:00
Michelle Linington
4a6fdf261e IOS-705: Adjust feature flags to enable modern CDS in prod
This enables modern CDS on internal devices in prod. This also removes
some of the infrastructure for reporting on modern/legacy comparisons.
2020-08-04 15:49:12 -07:00
Michelle Linington
fea5055f51 Adjust CDS file organization
This commit is just a copy/paste of code to colocate and split up some
CDS code.
2020-08-04 15:49:12 -07:00
Nora Trapp
008e6bc0d7 Fix rendering of profile name changes with no visual change 2020-08-04 14:24:44 -07:00
Nora Trapp
d6ad7868a3 PR Feedback 2020-08-04 14:18:10 -07:00
Nora Trapp
2701866626 Enable mentions for internal builds 2020-08-04 14:09:07 -07:00
Nora Trapp
01bcdd0e84 Add scroll to mention button 2020-08-04 14:09:06 -07:00
Nora Trapp
6f963c7ba5 Add mention notification settings 2020-08-04 14:09:06 -07:00
Nora Trapp
340f8366d9 Allow tapping mentions in message bubbles 2020-08-04 14:09:06 -07:00
Nora Trapp
427f42874d Track who was mentioned in a given message in a queryable way 2020-08-04 14:09:06 -07:00
Nora Trapp
a39750113f Full suppoort for ention send + receive 2020-08-04 14:08:30 -07:00
Nora Trapp
4696a4d993 Mention sending 2020-08-04 14:08:30 -07:00
Nora Trapp
74e5d719bb Add support for mentions to drafts 2020-08-04 14:08:29 -07:00
Nora Trapp
e8ec5330a0 Add mentions to the database 2020-08-04 14:08:29 -07:00
Nora Trapp
0ce2bc42ed Tweak MessageBody to better align with TSMessage 2020-08-04 14:07:26 -07:00
Matthew Chen
dcf2ebe30f Fix over-zealous assert. 2020-08-03 19:49:05 -03:00
Matthew Chen
ed7206423e Avoid conflicts are keys for local user account and recipient. 2020-08-03 19:42:08 -03:00
jimio-signal
540579c43f update keyBackupServiceId for production and staging 2020-08-03 17:03:07 -03:00
Matthew Chen
0d96af0a38 Add explicit key type of model read cache. 2020-08-03 16:21:18 -03:00
Matthew Chen
2fa5193fef Don't upload v1 groups avatars as v3 attachments. 2020-08-03 16:18:14 -03:00
Matthew Chen
c69a5a8f3a Don't upload v1 groups avatars as v3 attachments. 2020-08-03 16:06:33 -03:00
Michelle Linington
42e4a0a629 Update production CDS enclave ID 2020-08-03 11:12:50 -07:00
Michelle Linington
f0358d706f Run precommit script 2020-08-03 11:12:50 -07:00
Michelle Linington
dca2ce5b96 Check for a nil result set instead of cancellation
A nil result set is always bad if we're expecting completion. If there's
no error provided, we should make a fallback error.
2020-08-03 11:12:50 -07:00
Michelle Linington
1ceffed228 IOS-690: Enable modern CDS support in ContactsUpdater
This change enables support for modern CDS in ContactsUpdater. It
accomplishes this by making the two CDS operation conform to a single
protocol, and then interacting with a generic interface.

This also makes some minor organizational changes to the contact
discovery operations. There's more that I want to do here but this
should work for now. This also fixes a bug where cancelled operations
might cause us to unregister all of our SignalRecipients. There's a
stopgap in place for now, but a more robust fix will come later.

Also updates the staging CDS enclave ID.
2020-08-03 11:12:50 -07:00
Matthew Chen
193957a80e Fix v3 attachment downloads. 2020-08-02 07:08:06 -03:00
Matthew Chen
50283af0ff Fix error handling. 2020-08-01 12:28:05 -03:00