Commit Graph

2 Commits

Author SHA1 Message Date
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
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