mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 23:17:20 +01:00
Nullify ChatEmbedFooter
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user