Nullify ChatEmbedProvider

This commit is contained in:
Jordan Dominion
2023-12-23 10:15:32 -05:00
parent e9b6cbdc66
commit 34571a19cd
2 changed files with 4 additions and 6 deletions
@@ -1034,7 +1034,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
var discordEmbed = new Embed
{
Author = embed.Author != null
? new EmbedAuthor(embed.Author.Name)
? new EmbedAuthor(embed.Author.Name!)
{
IconUrl = embed.Author.IconUrl ?? default(Optional<string>),
ProxyIconUrl = embed.Author.ProxyIconUrl ?? default(Optional<string>),
@@ -1,6 +1,4 @@
#nullable disable
namespace Tgstation.Server.Host.Components.Interop
namespace Tgstation.Server.Host.Components.Interop
{
/// <summary>
/// Represents information about a <see cref="ChatEmbed"/> provider.
@@ -10,13 +8,13 @@ namespace Tgstation.Server.Host.Components.Interop
/// <summary>
/// Gets the name of the provider.
/// </summary>
public string Name { get; set; }
public string? Name { get; set; }
/// <summary>
/// Gets the URL of the provider.
/// </summary>
#pragma warning disable CA1056 // Uri properties should not be strings
public string Url { get; set; }
public string? Url { get; set; }
#pragma warning restore CA1056 // Uri properties should not be strings
}
}