From 7b7df564ed0c48127b5c05c820fc9a17c49060ba Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:22:51 +0300 Subject: [PATCH] Allow empty names in interactions --- DiscordChatExporter.Core/Discord/Data/Interaction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscordChatExporter.Core/Discord/Data/Interaction.cs b/DiscordChatExporter.Core/Discord/Data/Interaction.cs index bb9322de..3a020d40 100644 --- a/DiscordChatExporter.Core/Discord/Data/Interaction.cs +++ b/DiscordChatExporter.Core/Discord/Data/Interaction.cs @@ -10,7 +10,7 @@ public record Interaction(Snowflake Id, string Name, User User) public static Interaction Parse(JsonElement json) { 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); return new Interaction(id, name, user);