From 82d1b3090fb548560e5785a2ac1192ba29c36668 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 23 Dec 2023 10:14:02 -0500 Subject: [PATCH] Nullify `ChatEmbedFooter` --- .../Components/Chat/Providers/DiscordProvider.cs | 2 +- .../Components/Interop/ChatEmbedFooter.cs | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs index 1ee21f9ca0..b21202ed37 100644 --- a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs +++ b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs @@ -1045,7 +1045,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers Description = embed.Description ?? default(Optional), Fields = fields ?? default(Optional>), Footer = embed.Footer != null - ? (Optional)new EmbedFooter(embed.Footer.Text) + ? (Optional)new EmbedFooter(embed.Footer.Text!) { IconUrl = embed.Footer.IconUrl ?? default(Optional), ProxyIconUrl = embed.Footer.ProxyIconUrl ?? default(Optional), diff --git a/src/Tgstation.Server.Host/Components/Interop/ChatEmbedFooter.cs b/src/Tgstation.Server.Host/Components/Interop/ChatEmbedFooter.cs index 2105603d92..57d45ec7eb 100644 --- a/src/Tgstation.Server.Host/Components/Interop/ChatEmbedFooter.cs +++ b/src/Tgstation.Server.Host/Components/Interop/ChatEmbedFooter.cs @@ -1,6 +1,4 @@ -#nullable disable - -namespace Tgstation.Server.Host.Components.Interop +namespace Tgstation.Server.Host.Components.Interop { /// /// Represents a footer in a . @@ -10,18 +8,18 @@ namespace Tgstation.Server.Host.Components.Interop /// /// Gets the text of the footer. /// - public string Text { get; set; } + public string? Text { get; set; } /// /// Gets the URL of the footer icon. Only supports http(s) and attachments. /// #pragma warning disable CA1056 // Uri properties should not be strings - public string IconUrl { get; set; } + public string? IconUrl { get; set; } /// /// Gets the proxied icon URL. /// - public string ProxyIconUrl { get; set; } + public string? ProxyIconUrl { get; set; } #pragma warning restore CA1056 // Uri properties should not be strings } }