Repository navigation
fix(username): accept handles up to the contract's 30 characters - #1168
Merged
Merged
Conversation
common.v1.Username allows ^[a-z0-9_]{2,30}$ since the flipcash2 0.22.0
contract, but Username still matched {2,15}. The server now assigns
handles like ted_livingston_2 (16 chars) to new accounts, so the welcome
chat's share-profile widget failed to parse and drew as "This Message
Needs a Newer Version of Flipcash", and the handle could not be looked
up, mentioned, or opened from a flipcash.com link.
Username and the mention pattern now take 2-30. Claiming stays capped
at 15: UsernameValidator enforces the cap itself instead of leaning on
Username, and the lookup screen validates against Username.maximumLength
so assigned handles past the cap can still be found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New accounts are being assigned handles past 15 characters (e.g.
ted_livingston_2), butUsernamestill matched^[a-z0-9_]{2,15}$. The contract has allowed{2,30}since the flipcash2 0.22.0 sync. For those users:flipcash.com/<handle>linkChanges:
UsernameandMentionDetectoraccept 2–30 characters.UsernameValidatornow enforces that cap itself rather than relying onUsernameto reject longer input, and takes an optional maximum.UsernameLookupScreenvalidates againstUsername.maximumLength, so a handle past the claim cap can still be found.Swift has no generated validators (
generate-swift.shskipsvalidate.proto), so the pattern is still a hand-kept mirror of the contract. Tests pin both ends (16 and 30 accepted, 31 rejected) forUsername, mentions, deep links and the share-profile widget.Android counterpart: same branch name in code-android-app.