Cleanup and minor fixes

This commit is contained in:
Alexey Golub
2020-04-27 13:24:20 +03:00
parent 247f3a9c5b
commit 4a35a7b530
6 changed files with 47 additions and 39 deletions

View File

@@ -39,7 +39,7 @@ namespace DiscordChatExporter.Domain.Exporting
private async Task<MessageWriter> GetWriterAsync()
{
// Ensure partition limit is not exceeded
// Ensure partition limit has not been exceeded
if (IsPartitionLimitReached())
{
await ResetWriterAsync();

View File

@@ -5,7 +5,6 @@ using DiscordChatExporter.Domain.Discord.Models;
namespace DiscordChatExporter.Domain.Exporting
{
// Used for grouping contiguous messages in HTML export
internal partial class MessageGroup
{
public User Author { get; }

View File

@@ -23,7 +23,11 @@ namespace DiscordChatExporter.Domain.Exporting.Writers.MarkdownVisitors
public override MarkdownNode VisitMention(MentionNode mention)
{
if (mention.Type == MentionType.User)
if (mention.Type == MentionType.Meta)
{
_buffer.Append($"@{mention.Id}");
}
else if (mention.Type == MentionType.User)
{
var member = _context.TryGetMentionedMember(mention.Id);
var name = member?.User.Name ?? "Unknown";