From f99f1f464174309cc6e9f2c0d8be94ebbb0d0aee Mon Sep 17 00:00:00 2001
From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Date: Thu, 9 Feb 2023 19:53:31 +0200
Subject: [PATCH] Normalize spaces before system notifications
---
.../Exporting/MessageGroupTemplate.cshtml | 22 ++++++++++---------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml
index 7b336e67..3fb2bab7 100644
--- a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml
+++ b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml
@@ -92,11 +92,14 @@
@{/* Author name */}
@userNick
+ @{/* Space out the content */}
+
+
@{/* System notification content */}
@if (message.Kind == MessageKind.RecipientAdd && message.MentionedUsers.Any())
{
- added
+ added
@message.MentionedUsers.First().Name
to the group.
}
@@ -104,45 +107,44 @@
{
if (message.Author.Id == message.MentionedUsers.First().Id)
{
- left the group.
+ left the group.
}
else
{
- removed
+ removed
@message.MentionedUsers.First().Name
from the group.
}
}
else if (message.Kind == MessageKind.Call)
{
- started a call that lasted @(((message.CallEndedTimestamp ?? message.Timestamp) - message.Timestamp).TotalMinutes) minutes
+ started a call that lasted @(((message.CallEndedTimestamp ?? message.Timestamp) - message.Timestamp).TotalMinutes) minutes
}
else if (message.Kind == MessageKind.ChannelNameChange)
{
- changed the channel name:
+ changed the channel name:
@message.Content
}
else if (message.Kind == MessageKind.ChannelIconChange)
{
- changed the channel icon.
+ changed the channel icon.
}
else if (message.Kind == MessageKind.ChannelPinnedMessage && message.Reference is not null)
{
- pinned
+ pinned
a message
to this channel.
}
else if (message.Kind == MessageKind.ThreadCreated)
{
- started a thread.
+ started a thread.
}
else if (message.Kind == MessageKind.GuildMemberJoin)
{
- joined the server.
+ joined the server.
}
else
{
-
@message.Content.ToLowerInvariant()
}