fix(usernames): sync index active collectible aliases

This commit is contained in:
iamxvbaba 2026-07-28 16:22:34 +08:00
parent 2f995f607a
commit 5156b17c1b
29 changed files with 657 additions and 112 deletions

View file

@ -597,7 +597,10 @@ func (s *Service) ResolvePublicUsername(ctx context.Context, userID int64, usern
return domain.Channel{}, false, domain.ErrChannelInvalid
}
username = normalizeChannelUsername(username)
if !validChannelUsername(username) {
// Public resolution also covers Fragment-style collectible usernames,
// whose protocol minimum is four characters. Channel username mutation
// remains on the ordinary 5..32 validation path above.
if !domain.ValidCollectibleUsername(username) {
return domain.Channel{}, false, domain.ErrUsernameInvalid
}
return s.channels.ResolvePublicChannelUsername(ctx, userID, username)