From 4bfc321e45c5c6d31386095aad2ac4fcc8fc1279 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 23 Dec 2023 10:12:31 -0500 Subject: [PATCH] Nullify `ChatEmbedField` --- .../Components/Chat/Providers/DiscordProvider.cs | 2 +- .../Components/Interop/ChatEmbedField.cs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs index 047febbe00..1ee21f9ca0 100644 --- a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs +++ b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs @@ -995,7 +995,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers if (invalid) continue; - fields.Add(new EmbedField(field.Name, field.Value) + fields.Add(new EmbedField(field.Name!, field.Value!) { IsInline = field.IsInline ?? default(Optional), }); diff --git a/src/Tgstation.Server.Host/Components/Interop/ChatEmbedField.cs b/src/Tgstation.Server.Host/Components/Interop/ChatEmbedField.cs index f584557992..70b3c37c9f 100644 --- a/src/Tgstation.Server.Host/Components/Interop/ChatEmbedField.cs +++ b/src/Tgstation.Server.Host/Components/Interop/ChatEmbedField.cs @@ -1,6 +1,4 @@ -#nullable disable - -namespace Tgstation.Server.Host.Components.Interop +namespace Tgstation.Server.Host.Components.Interop { /// /// Represents a field in a . @@ -10,12 +8,12 @@ namespace Tgstation.Server.Host.Components.Interop /// /// Gets the name of the field. /// - public string Name { get; set; } + public string? Name { get; set; } /// /// Gets the value of the field. /// - public string Value { get; set; } + public string? Value { get; set; } /// /// Gets a value indicating whether the field should display inline.