HomePhabricator
Diffusion Comm 52cb9f603a73

[native] Introduce code to call keyserver for registration in new flow

Description

[native] Introduce code to call keyserver for registration in new flow

Summary:
This is the code that will actually register a user (ENG-4047). Some notes:

  1. I initially considered passing the avatar directly to the registration endpoint, but realized that gets complicated since we need a logged-in user in order to do a media upload. Instead here I first register the user, and in a later diff I'll handle setting the user's avatar.
  2. We don't yet have a screen for accepting terms (ENG-3951). For now I'm calling the registration endpoint from AvatarSelection, but after introducing a screen for accepting terms I'll move the registration call.

Depends on D8148

Test Plan:
The whole stack was tested as follows:

  1. Try creating an account with the default avatar
  2. Try creating an account with an emoji avatar
  3. Try creating an account with an image avatar (that needs to be uploaded)
  4. Try creating an Ethereum account with an ENS avatar

I made sure of the following:

  1. Loading spinner appeared on the button, not on the avatar, and was present throughout
  2. After the RegistrationNavigator is dismissed, the avatar that appears for the user's PRIVATE chat in the ChatThreadList is correct
  3. Subsequent delete-account-and-then-register-again worked correctly
  4. Various error cases are triggered correctly

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D8149

Details

Provenance
ashoatAuthored on Jun 2 2023, 9:09 AM
Reviewer
atul
Differential Revision
D8149: [native] Introduce code to call keyserver for registration in new flow
Parents
rCOMMa199041bb1a9: [native] Introduce RegistrationContext
Branches
Unknown
Tags
Unknown