Commit Graph

86 Commits

Author SHA1 Message Date
Matthew Chen
2d8dc4036c Add PhoneNumberUtilTestSwift. 2021-10-22 19:06:48 -03:00
Matthew Chen
007a00a17b Add PhoneNumberUtil singleton. 2021-10-22 19:06:15 -03:00
Matthew Chen
a0efdc2e95 Respond to CR. 2021-10-21 09:21:33 -03:00
Matthew Chen
5d780d1589 Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
Matthew Chen
c1a8005a74 Never emit invalid e164 in storage service contact records; be robust to invalid e164 incoming protos. 2021-09-01 16:33:16 -03:00
Matthew Chen
fcdca12cf5 Deprecate REST, Part 1
* Port socket manager to Swift.
* Clean up HTTP request success/failure state & errors.
* Rework network manager.
* Rework HTTP errors.
* Rework errors "properties": isRetryable, etc.
* Fix test breakage.
2021-08-18 14:25:36 -03:00
Matthew Chen
718120f725 Fix test imports. 2021-06-07 11:41:43 -04:00
Matthew Chen
37052a302a Fix build warnings around imports. 2021-06-07 11:11:30 -04:00
Matthew Chen
211b93581b Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
645bd76bd5 Rework app readiness. 2021-02-04 09:55:39 -03:00
Matthew Chen
d364796d9d Remote obsolete remote config & feature flags around gv2. 2020-10-08 17:24:11 -03:00
Matthew Chen
c017e76aab Rename singleton accessors. 2020-09-17 21:11:09 -03:00
Nora Trapp
18e19088a5 Fix broken tests 2020-08-28 13:10:47 -07:00
Fumiaki Yoshimatsu
b62f94c924 Fixes a test by giving a semi-bogus phone number to work around an assertion. 2020-08-28 09:43:54 -07:00
Michelle Linington
cd26048e43 Add tests for ContactDiscoveryTask.RateLimiter 2020-08-13 15:08:12 -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
Nora Trapp
9696671f8a Add trustLevel to SignalServiceAddress 2020-08-05 14:36:43 -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
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
Michelle Linington
2d1b90f443 Pull request feedback: retry indefinitely on CDS failure
After some discussion, we're okay considering that if CDS is down, all
of Signal is down. This will help protect session state and reduce the
risk of divergence.

Also changed the FeatureFlag guarding this code to
useOnlyModernContactDiscovery.
2020-07-13 18:20:47 -07:00
Michelle Linington
16583ceafa Additional review feedback:
- Removed static UUIDBackfillTask initializer and removed the
  registration from AppDelegate. Kicking off the task will be handled
  with IOS-631.
- Moved the async perform work to its own function
- Some minor syntactic changes
- Updated database fetch to retrieve empty string UUIDs
- Handles non-e164 numbers fetched from database
- Leverages the MockSSKEnvironment to deal with the shared
  SignalServiceAddressCache. Removes added test support.
- Add tests to exercise new functionality
2020-07-13 18:20:47 -07:00
Michelle Linington
ddb2467ebf Added tests to exercise UUIDBackfillTask
This adds a whole bunch of tests for UUIDBackfillTask. This required a
small change to be made in SignalServiceAddress. Currently,
SignalServiceAddress accesses a singleton cache to force updates to any
existing addresses after a UUID is discovered. This breaks a whole bunch
of test verification.

To workaround this, I've added a testing_ flag to modify the singleton
SignalServiceAddressCache to temporarily disable it. This is going to
cause problems if we ever enable test parallelization, but it's all we
can do for now.

This also adds in incremental backoff logic, changes some of the log
statements and disables the task on production.

Also, adopted some minor feedback Matthew provided in the draft PR,
including:
- Rename: {signal -> registered}RecipientsWithoutUUID
- Move to owsFailDebug instead of assertionFailure
- Adopt `IsNetworkConnectivityFailure` for discerning network failures
- Add some extra assertions around our registered/unregistered sets
2020-07-13 18:20:47 -07:00
Matthew Chen
255cfe1cfd Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Matthew Chen
c2cb189e16 Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Matthew Chen
fad9510dbe Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Nora Trapp
f0d7a9cb9c Add early message handling for delivery receipts, reactions, and delete for everyone 2020-04-16 19:44:45 -07:00
Nora Trapp
5c976b0acd PR Feedback 2020-03-16 16:30:58 -07:00
Nora Trapp
72842e094d Disable some tests temporarily 2020-03-14 15:40:02 -07:00
Matthew Chen
bc0359268e Rework outgoing messages; embed change protos in outgoing change messages for groups v2. 2020-01-27 11:47:44 -03:00
Michael Kirk
9be32858d0 permissively parse legacy and modern mexican phone number formats 2020-01-16 11:41:48 -07:00
Michael Kirk
61fb6e575e remove block from overwriting update, undeprecate upsert 2019-11-04 14:06:54 -08:00
Michael Kirk
329fffb8e2 Fixing up phonenumber parsing tests 2019-10-25 18:33:56 -07:00
Matthew Chen
7ee8cdfa84 Fix PhoneNumberUtilTest. 2019-10-01 13:35:54 -03:00
Matthew Chen
f5d2915689 Respond to CR. 2019-09-13 20:46:08 -03:00
Matthew Chen
6a529e792d Rework message configuration. Simplify change detection, ensure continuity for deleted threads. 2019-09-13 20:40:06 -03:00
Matthew Chen
bcd58bd538 Simplify disappearing messages configuration. 2019-09-04 09:43:59 -03:00
Matthew Chen
a48ccccdd1 Remove more usage of primary storage. 2019-08-07 17:41:11 -03:00
Matthew Chen
eccfad0f46 Merge remote-tracking branch 'private/release/2.41.0' 2019-08-06 12:12:39 -03:00
Matthew Chen
4f03f969fc Rework "view once" messages. 2019-08-01 16:13:37 -03:00
Matthew Chen
77b9500154 Convert interactions to BaseModel. 2019-07-19 15:25:28 -03:00
Matthew Chen
e0b63bfd87 Respond to CR. 2019-07-16 13:50:22 -03:00
Nora Trapp
ef4a612fcf No more transitional_signalServiceAddress 2019-07-11 10:53:33 -07:00
Nora Trapp
761ce29428 Fix tests 2019-07-10 12:45:30 -07:00
Matthew Chen
f143c693b3 Revert "Merge branch 'mkirk/stub-uuid-receive'"
This reverts commit 4ba65bc7ea, reversing
changes made to 70d97e11c5.
2019-06-28 09:52:18 -04:00
Michael Kirk
0c944fe9f4 Incoming message has authorAddress 2019-06-27 14:22:13 -06:00
Nora Trapp
7d94af3287 Migrate TSContactThread to support UUIDs 2019-06-27 13:12:52 -07:00
Michael Kirk
793e2854a7 fixup tests 2019-06-27 10:21:41 -06:00
Michael Kirk
0907a2257f Convert Recipient and SessionStore to SignalServiceAddress 2019-06-26 17:48:16 -06:00