Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR finishes the previously stubbed out admin functionality for requesting and setting email address, confirmation status, and registration preference/status.
It also adds a check that was missing to the formatting screenname validation that the sn doesn't end in a space.
Email Address
Confirmation Status
Registration Preference/Status
Other changes
Future changes
Just wanted to mention that I'm intentionally not doing in this PR:
Testing Done
Logging in as a brand new account, the account shows up as 'Unconfirmed Internet' in the buddy list
Attempting to format the screenname with one ending in a space results in an error
Attempting to confirm the account (My AIM > Edit Options > Confirm Account) without an email address set results in an error
Opening the update email address window, it starts out reporting the user has no email set
Attempting to enter an invalid email format results in an error
Setting the email to TestUser10@aol.com results in a success message. Note that as of this writing, the email change isn't actually pending and the user doesn't need to wait 72 hours. The email is immediately updated in the database, which can be seen if you open the update email address window again
Now with an email set, the account can be confirmed. Attempting to reconfirm the account will tell the user it's already confirmed
Confirming the account sends a broadcast to all buddies with the updated userinfo tlv and now hovering over the name no longer shows the unconfirmed status
Resigning into AIM, the user continues to report as just 'Internet' not 'Unconfirmed Internet'
I also tested that setting Away/returning still works as I moved the logic for setting those flags.
Going to Preferences > Privacy, the toggle at the bottom can now be adjusted and saved
For the database migration I started with a database from retro-aim-server release version 0.8.0. Running the newer binary from my local build resulted in the database table having additional columns created and email address could be saved.
All unit tests pass.