···8686 if (request.PermitFollowback.HasValue)
8787 user.UserSettings.AutoAcceptFollowed = request.PermitFollowback.Value;
88888989- if (request.Fields?.Where(p => p is { Name: not null, Value: not null }).ToList() is { Count: > 0 } fields)
8989+ var requestFields = request.JsonFields?.Values as IEnumerable<AccountSchemas.AccountUpdateField>
9090+ ?? request.Fields;
9191+9292+ if (requestFields?.Where(p => p is { Name: not null, Value: not null }).ToList() is { Count: > 0 } fields)
9093 {
9194 user.UserProfile.Fields =
9295 fields.Select(p => new UserProfile.Field
···11using Microsoft.AspNetCore.Mvc;
22+using Microsoft.AspNetCore.Mvc.ModelBinding;
23using B = Microsoft.AspNetCore.Mvc.BindPropertyAttribute;
34using J = System.Text.Json.Serialization.JsonPropertyNameAttribute;
55+using JI = System.Text.Json.Serialization.JsonIgnoreAttribute;
4657namespace Iceshrimp.Backend.Controllers.Mastodon.Schemas;
68···3739 [B(Name = "indexable")]
3840 public bool? IsIndexable { get; set; }
39414040- [J("fields_attributes")]
4142 [B(Name = "fields_attributes")]
4343+ [JI]
4244 public List<AccountUpdateField>? Fields { get; set; }
4545+4646+ /// Note that the integer index does not actually matter -- fields will be populated by the order in which they are provided.
4747+ /// https://github.com/mastodon/mastodon/issues/22174
4848+ [J("fields_attributes")]
4949+ [BindNever]
5050+ public OrderedDictionary<string, AccountUpdateField>? JsonFields { get; set; }
43514452 [J("permit_followback")]
4553 [B(Name = "permit_followback")]