Fix profile refresh identity compatibility

This commit is contained in:
IanShaw027
2026-04-21 00:42:55 +08:00
parent 030da8c2f6
commit e4fe9fae2a
7 changed files with 195 additions and 92 deletions

View File

@@ -403,6 +403,11 @@ func normalizeUserAvatarInput(raw string) (UpsertUserAvatarInput, error) {
}, nil
}
func ValidateUserAvatar(raw string) error {
_, err := normalizeUserAvatarInput(raw)
return err
}
func normalizeInlineUserAvatarInput(raw string) (UpsertUserAvatarInput, error) {
body := strings.TrimPrefix(raw, "data:")
meta, encoded, ok := strings.Cut(body, ",")