mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-15 00:03:38 -07:00
Allow empty names in interactions
This commit is contained in:
parent
80b59d1254
commit
7b7df564ed
|
|
@ -10,7 +10,7 @@ public record Interaction(Snowflake Id, string Name, User User)
|
||||||
public static Interaction Parse(JsonElement json)
|
public static Interaction Parse(JsonElement json)
|
||||||
{
|
{
|
||||||
var id = json.GetProperty("id").GetNonWhiteSpaceString().Pipe(Snowflake.Parse);
|
var id = json.GetProperty("id").GetNonWhiteSpaceString().Pipe(Snowflake.Parse);
|
||||||
var name = json.GetProperty("name").GetNonWhiteSpaceString();
|
var name = json.GetProperty("name").GetNonNullString(); // may be empty, but not null
|
||||||
var user = json.GetProperty("user").Pipe(User.Parse);
|
var user = json.GetProperty("user").Pipe(User.Parse);
|
||||||
|
|
||||||
return new Interaction(id, name, user);
|
return new Interaction(id, name, user);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue