Commit Graph

99 Commits

Author SHA1 Message Date
Sasha Weiss
6b5ce3690f
Add support for changing visible username case 2024-01-18 11:13:18 -08:00
Max Radermacher
b095509975
Drop obsolete removeMessageAfterSending support 2024-01-04 14:37:54 -06:00
Max Radermacher
89ddc81b0c
Add initial JobQueueRunner implementation 2023-12-12 13:34:46 -06:00
Max Radermacher
6d16de2522
Change how job queue labels are specified 2023-12-11 13:39:48 -06:00
Pete Walters
2f53b3e4ec
Support subscriptions in the iDEAL payment flow 2023-12-11 08:57:20 -06:00
Max Radermacher
f848a6373f
Swiftify the rest of MessageSender 2023-11-27 11:29:23 -06:00
Harry
9f1c8e3dd0
Refactor AccountManager's finishProvisioningSecondary method 2023-11-21 12:37:00 -08:00
Sasha Weiss
7f41ecaa8b
Support SEPA bank transfer donations 2023-11-06 13:49:40 -08:00
Elaine
5c6e63720e
Redesign donation payment details input 2023-11-02 13:01:53 -06:00
Max Radermacher
9232a069b0 Fix duplicated capabilities code 2023-10-26 15:27:38 -05:00
Elaine
6563addcde
Rewrite subscription request factory in Swift 2023-10-05 10:08:01 -06:00
Max Radermacher
9b86028863
[ServiceId] Update registration code 2023-08-21 17:29:37 -05:00
Max Radermacher
b103f3d939
[ServiceId] Update outgoing messages 2023-08-17 11:09:00 -05:00
Harry
2cb6700419
Delete legacy registration 2023-08-10 09:22:17 -07:00
Max Radermacher
c219728112
[ServiceId] Update spam reporting 2023-08-02 17:36:54 -05:00
Sasha Weiss
1398e335a0
Implement username links 2023-07-31 14:58:07 -07:00
Max Radermacher
17a2fb4093
Rename ServiceId -> UntypedServiceId 2023-07-26 16:56:19 -05:00
Max Radermacher
b593cba603
Adopt randomForTesting/constantForTesting 2023-07-26 16:29:14 -05:00
Sasha Weiss
88f304b0c9
Prune orphaned job records 2023-05-10 14:32:22 -07:00
Harry
4fdd5b712f
Migrate TSRequest to swift 2023-05-08 11:01:59 -07:00
Evan Hahn
ea970bbd02
Clean up "set default subscription payment method" request. 2023-04-24 15:50:26 -07:00
Max Radermacher
94a9c8cd65 Improve the performance of some tests 2023-04-17 14:14:57 -07:00
Sasha Weiss
c9fbc9a9ee
Migrate SSKJobRecord and subclasses to SDSCodableModel using factory init 2023-04-13 10:57:48 -07:00
Evan Hahn
20f29ff844
Account data report: remove separate download step 2023-04-11 09:25:20 -05:00
Evan Hahn
3e7fdb0e2c
Account data report: let users export text 2023-04-03 12:17:28 -05:00
Evan Hahn
0d6da58045
Add very basic account data export functionality
The UI is not ready for release, but the basic parts are there.
2023-03-29 10:34:12 -05:00
Harry
a146e18aaf
Set up account state and exit registration
* Go to chat list view after registration

* sync system contacts during registration

* Use explicit local credentials for storage service operations during registration

* fix tests

* Quick hack to get through double pin confirmation

* Finishing touches

* lint

* fix build

* reload phone number discoverability after storage service sync

* fix tests again

* Take chat auth on account and contact record initializers

* Change around branches for clarity in OWSUserProfile

* pr comments

* Split ChatServiceAuth into the same and AuthedAccount

* fix tests

* merge woes
2023-03-09 21:54:51 -08:00
Harry
cb6e99dd1d
Mark registration complete in RegistrationCoordinator 2023-02-24 11:12:22 -08:00
Max Radermacher
0598c3f9b9
Clean up JobRecordFinder 2023-02-22 13:54:56 -08:00
Max Radermacher
59593c3c97
Add ServiceId & E164 types
* Use the new E164 type in a few places
* Use the new ServiceId type in a few places
2023-02-21 23:13:46 -08:00
Harry
3d6225060d
Add RegistrationCoordinator
* Add ability to compute registration recovery password

* Add RegistrationCoordinator

* remove repeat nav controller that evan added

* Scaffolding for RegistrationCoodinator test

* Add first round of RegistrationCoordinator tests, some stuff I needed to get them working, and some fixes to RegistrationCoordinator itself I discovered thanks to the tests

* switch to owsFailBeta

* Add auth credential candidate flow tests, related fixes and additions to coordinator and friends

* Add tests for session based registration path and associated fixes

* PR comment nits
2023-02-14 08:50:24 -08:00
Sasha Weiss
bcfd291f9c
Add support for username hashing 2023-02-08 16:02:02 -08:00
Harry
fc4ec188e8
Implement RegistrationSessionManager
* Add RegistrationSession object

* Add RegistrationSessionManager protocol

* Add skeleton RegistrationSessionManagerImpl - just kvstore persistence implemented

* Issue requests in RegistrationSessionManagerImpl

* let tests access the in memory kv store

* Add TSRequestOWSURLSessionMock. Rename OWSURLSessionMock

* Add DateProvider

* Take a dateProvider in RegistrationSessionManagerImpl

* Add tests for RegistrationSessionManager

* pre-emptively update timeout for tests. will remove once promise Scheduler code is merged

* PR comments

* Use Schedulers
2023-02-08 15:37:12 -08:00
Harry
ff7567370c
Add request/response types for Registration Session APIs
* Add UnknownEnumCodable+tests

* Add Registration session requests and responses + tests

* Use shared Accept-Language code
2023-02-06 12:44:31 -08:00
Evan Hahn
7efe024940 Explain why a migration lacks a column type
This change should have no user impact.

I created a column in 8d707a9c74. I wanted
it to be a `BLOB`. I succeeded because [SQLite chooses `BLOB` by
default][0], but I wish I had been explicit.

I *could've* updated the migration, but didn't want to make a mistake
and cause divergent migrations. Instead, I added a comment.

I also updated a test.

[0]: https://www.sqlite.org/datatype3.html#determination_of_column_affinity
2023-02-06 08:34:00 -08:00
Harry
9a511cdda0
Add deprecated prefix to all existing onboarding/registration types
* Add deprecated prefix to all existing onboarding/registration types. (Will be forked to new versions later, potentially untouched)

* Mark old requests deprecated
2023-02-03 15:02:04 -08:00
Evan Hahn
cc92abdc90
Clean up "delete subscriber ID" request
This is similar to 227f05e932.

This change should have no user impact.

This changes the "delete subscriber ID" request in the following ways:

- Adds tests
- Converts it to Swift
- Renames `deleteSubscriptionIDRequest` to `deleteSubscriberID`
- Serializes the data inside the method, rather than requiring callers
  to do so
2023-01-27 15:11:48 -08:00
Evan Hahn
227f05e932 Clean up "set subscriber ID" request
This change should have no user impact.

This changes the "set subscriber ID" request in the following ways:

- Adds tests
- Converts it to Swift
- Renames `setSubscriptionIDRequest` to `setSubscriberID`
- Serializes the data inside the method, rather than requiring callers
  to do so

Tested this with automated tests and manually starting a subscription in
staging.
2023-01-26 13:45:25 -06:00
Sasha Weiss
1126c98f19
"Select a username" UX 2023-01-26 11:38:21 -08:00
Evan Hahn
abd130a4c2
Clean up preauth challenge request
This change should have no user impact. It makes a few cleanups to
`OWSRequestFactory.requestPreauthChallengeRequest`:

- Adds tests
- Converts it to Swift
- Renames it to `requestPreauthChallenge`
- URL-encodes the parameters. This required some additional scaffolding;
  see `URLPathComponents`.
2023-01-25 14:22:22 -06:00
Evan Hahn
8d707a9c74
Add spam reporting tokens 2023-01-25 14:14:57 -06:00
Evan Hahn
35c314bde5
Clean up donation configuration request
This change should have no user impact.

This changes a few things about
`OWSRequestFactory.donationConfigurationRequest()`:

- Adds tests
- Converts it to Swift
- Renames it to `donationConfiguration()`
- Makes it an unauthenticated request

I'm most concerned about that last thing, because it's a behavior
change. However, I think this is safe because:

1. I tested it in a simulator and it works

2. [Android appears to do the same thing][0]

3. A normal `curl` works just fine:

   ```
   curl --insecure 'https://chat.signal.org/v1/subscription/configuration'
   ```

[0]: 657c5d2bce/libsignal/service/src/main/java/org/whispersystems/signalservice/internal/push/PushServiceSocket.java (L1074)
2023-01-25 13:10:22 -06:00
Max Radermacher
0dc492fec5
Use common logic when creating web sockets 2023-01-24 14:01:34 -08:00
Evan Hahn
9563ea810c
Clean up device provisioning request
This change should have no user impact. It makes a few changes to
`OWSRequestFactory.deviceProvisioningRequestWithMessageBody`:

- Adds tests
- Converts it to Swift
- Renames it to `provisionDevice`
- URL-encodes one of the parameters

(I was thankful for `OWSDeviceProvisionerTest` when I made this change,
as it increased my confidence that this was safe.)
2023-01-24 09:42:52 -08:00
Evan Hahn
62215b97c3
Clean up "report spam" request code
This change should have no user impact.

This makes the following changes to `OWSRequestFactory.reportSpam`:

- Converts it to Swift
- Adds tests
- Handles a server GUID that couldn't be URL-encoded. For example, if it
  contained spaces, we'd crash constructing the URL. No longer!
- Handles an empty server GUID
2023-01-20 14:15:33 -06:00
Evan Hahn
76fb4a8b02 Swiftify OWSRequestFactory.enable2FARequest
This change should have no user impact.
2023-01-20 11:47:51 -06:00
Max Radermacher
a4889b7fa2 Reduce flakiness of MessageSenderJobQueueTest 2023-01-13 12:51:41 -08:00
Max Radermacher
fd3457b9a5 Update sending flow to use UUIDs 2023-01-09 12:00:51 -08:00
Sasha Weiss
ee4799b506 One-time donations via PayPal 2022-12-01 14:39:03 -08:00
Sasha Weiss
40e765fa4f Integrate the /v1/subscription/configuration API 2022-12-01 14:39:03 -08:00