Nullify ChatEmbedFooter

This commit is contained in:
Jordan Dominion
2023-12-23 10:14:02 -05:00
parent 4bfc321e45
commit 82d1b3090f
2 changed files with 5 additions and 7 deletions
@@ -1045,7 +1045,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
Description = embed.Description ?? default(Optional<string>),
Fields = fields ?? default(Optional<IReadOnlyList<IEmbedField>>),
Footer = embed.Footer != null
? (Optional<IEmbedFooter>)new EmbedFooter(embed.Footer.Text)
? (Optional<IEmbedFooter>)new EmbedFooter(embed.Footer.Text!)
{
IconUrl = embed.Footer.IconUrl ?? default(Optional<string>),
ProxyIconUrl = embed.Footer.ProxyIconUrl ?? default(Optional<string>),
@@ -1,6 +1,4 @@
#nullable disable
namespace Tgstation.Server.Host.Components.Interop
namespace Tgstation.Server.Host.Components.Interop
{
/// <summary>
/// Represents a footer in a <see cref="ChatEmbed"/>.
@@ -10,18 +8,18 @@ namespace Tgstation.Server.Host.Components.Interop
/// <summary>
/// Gets the text of the footer.
/// </summary>
public string Text { get; set; }
public string? Text { get; set; }
/// <summary>
/// Gets the URL of the footer icon. Only supports http(s) and attachments.
/// </summary>
#pragma warning disable CA1056 // Uri properties should not be strings
public string IconUrl { get; set; }
public string? IconUrl { get; set; }
/// <summary>
/// Gets the proxied icon URL.
/// </summary>
public string ProxyIconUrl { get; set; }
public string? ProxyIconUrl { get; set; }
#pragma warning restore CA1056 // Uri properties should not be strings
}
}