SOCIAL MEDIA REVOLUTION: New Feature Unleashed for Twitter and GitHub Verifications!
Tech Innovators Introduce Cutting-Edge Username Validation to Enhance User Experience and Security on Major Platforms.
Commit Details:
feat: support social verifications for twitter and github (#2370) ## Why is this change needed? Describe why this issue should be fixed and link to any relevant design docs, issues or other relevant items. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces support for validating `twitter` and `github` usernames in the system. It adds new constants, validation functions, and test cases to ensure username formats comply with specified rules. ### Detailed summary - Added constants `USER_DATA_TYPE_TWITTER` and `USER_DATA_TYPE_GITHUB` in `message.proto`. - Implemented validation functions `validateTwitterUsername` and `validateGithubUsername` in `validations.ts`. - Added regex patterns for Twitter and GitHub usernames. - Created test cases for Twitter username validation in `validations.test.ts`. - Updated functions to handle new user data types in `userDataTypeFromJSON` and `userDataTypeToJSON` across several files. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->