You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4fa7cdc
Browse filesBrowse the repository at this point in the historyBrowse files
feat(flipcash): wire usernames through profile and resolver (#1316)
Refresh the flipcash protos, which introduce a public `Username` handle:
- common/v1 gains a `Username` message (lowercase `^[a-z0-9_]{2,15}$`)
- `UserProfile` carries `user_id` and `username`
- `GetProfileRequest.user_id` becomes a `oneof identifier` of user ID or username
- the resolver `Identifier` oneof gains `username`
Wire all of it through the service layer:
- `UserProfile` gains `userId`/`username`, mapped in `UserProfileMapper` and in
the chat-member profile path, which decodes the same proto message. Both are
trailing and default to null so the positional constructor and previously
persisted profile JSON keep decoding.
- New `ProfileIdentifier` sealed interface mirrors the `GetProfileRequest` oneof
and is threaded through `ProfileApi` -> `ProfileService` -> `ProfileRepository`.
`ProfileController.getProfileForUser` is unchanged for callers; lookup by handle
is `getProfileForUsername`.
- `ResolveIdentifier.Username` plus `ResolverController.resolve(username)`.
`ProfileApi.getProfile` now validates its request like every other method in the
class, so a malformed handle fails locally instead of round-tripping: the oneof
carries `validate.required` and the username its character-set pattern.
The opencode protos were already up to date.
0 commit comments