[HTML] Full spoiler support (#285)

This commit is contained in:
FM-96
2020-04-05 20:30:15 +02:00
committed by GitHub
parent 5bce4b52ff
commit 18979c6a38
7 changed files with 114 additions and 11 deletions

View File

@@ -20,6 +20,8 @@ namespace DiscordChatExporter.Core.Models
public bool IsImage { get; }
public bool IsSpoiler { get; }
public FileSize FileSize { get; }
public Attachment(string id, int? width, int? height, string url, string fileName, FileSize fileSize)
@@ -32,6 +34,8 @@ namespace DiscordChatExporter.Core.Models
FileSize = fileSize;
IsImage = GetIsImage(fileName);
IsSpoiler = IsImage && FileName.StartsWith("SPOILER_", StringComparison.Ordinal);
}
public override string ToString() => FileName;