feat: migrate IM identity and snowflake primary keys

This commit is contained in:
richjohnrambo
2026-08-18 01:15:21 +08:00
parent db322d80dd
commit bf562c7d56
27 changed files with 1071 additions and 482 deletions
+4 -1
View File
@@ -2034,7 +2034,7 @@ func validUserPrivacyPatch(patch types.UserPrivacyPatch) bool {
}
func validUserProfilePatch(patch types.UserProfilePatch) bool {
if patch.AvatarFileID == nil && patch.Nickname == nil && patch.BirthDate == nil && patch.Signature == nil && patch.Gender == nil && patch.Region == nil {
if patch.AvatarFileID == nil && patch.Nickname == nil && patch.BirthDate == nil && patch.Signature == nil && patch.Gender == nil && patch.Region == nil && patch.Email == nil {
return false
}
if patch.Nickname != nil {
@@ -2046,6 +2046,9 @@ func validUserProfilePatch(patch types.UserProfilePatch) bool {
if patch.Signature != nil && len([]rune(*patch.Signature)) > 120 {
return false
}
if patch.Email != nil && len([]rune(strings.TrimSpace(*patch.Email))) > 128 {
return false
}
return true
}