mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 15:13:05 +00:00
Fix some models serialization
This commit is contained in:
1 parent
cc71e67a35
commit
51d0dd3a95
2 files changed
+126
-3
No files matched your search
@@ -103,7 +103,7 @@ public class GuildMemberListSyncItemJsonConverter : JsonConverter<GuildMemberLis
|
||||
{
|
||||
var n = JsonSerializer.Deserialize<JsonObject>(ref reader, options);
|
||||
if (n.ContainsKey("group")) return n.Deserialize<GuildMemberListSyncItem.RoleEntry>();
|
||||
if (n.ContainsKey("member")) return n.Deserialize<GuildMemberListSyncItem>();
|
||||
if (n.ContainsKey("member")) return n.Deserialize<GuildMemberListSyncItem.MemberEntry>();
|
||||
throw new InvalidOperationException("Could not determine sync item type for keys " + string.Join(", ", n.Select(x => x.Key)));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user