|
|
@ -92,11 +92,14 @@
|
|
|
|
@{/* Author name */}
|
|
|
|
@{/* Author name */}
|
|
|
|
<span class="chatlog__system-notification-author" style="@(userColor is not null ? $"color: rgb({userColor.Value.R}, {userColor.Value.G}, {userColor.Value.B})" : null)" title="@message.Author.FullName" data-user-id="@message.Author.Id">@userNick</span>
|
|
|
|
<span class="chatlog__system-notification-author" style="@(userColor is not null ? $"color: rgb({userColor.Value.R}, {userColor.Value.G}, {userColor.Value.B})" : null)" title="@message.Author.FullName" data-user-id="@message.Author.Id">@userNick</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@{/* Space out the content */}
|
|
|
|
|
|
|
|
<span> </span>
|
|
|
|
|
|
|
|
|
|
|
|
@{/* System notification content */}
|
|
|
|
@{/* System notification content */}
|
|
|
|
<span class="chatlog__system-notification-content">
|
|
|
|
<span class="chatlog__system-notification-content">
|
|
|
|
@if (message.Kind == MessageKind.RecipientAdd && message.MentionedUsers.Any())
|
|
|
|
@if (message.Kind == MessageKind.RecipientAdd && message.MentionedUsers.Any())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> added </span>
|
|
|
|
<span>added </span>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().Name</a>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().Name</a>
|
|
|
|
<span> to the group.</span>
|
|
|
|
<span> to the group.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -104,45 +107,44 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (message.Author.Id == message.MentionedUsers.First().Id)
|
|
|
|
if (message.Author.Id == message.MentionedUsers.First().Id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> left the group.</span>
|
|
|
|
<span>left the group.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> removed </span>
|
|
|
|
<span>removed </span>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().Name</a>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().Name</a>
|
|
|
|
<span> from the group.</span>
|
|
|
|
<span> from the group.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (message.Kind == MessageKind.Call)
|
|
|
|
else if (message.Kind == MessageKind.Call)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> started a call that lasted @(((message.CallEndedTimestamp ?? message.Timestamp) - message.Timestamp).TotalMinutes) minutes</span>
|
|
|
|
<span>started a call that lasted @(((message.CallEndedTimestamp ?? message.Timestamp) - message.Timestamp).TotalMinutes) minutes</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (message.Kind == MessageKind.ChannelNameChange)
|
|
|
|
else if (message.Kind == MessageKind.ChannelNameChange)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> changed the channel name: </span>
|
|
|
|
<span>changed the channel name: </span>
|
|
|
|
<span class="chatlog__system-notification-link">@message.Content</span>
|
|
|
|
<span class="chatlog__system-notification-link">@message.Content</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (message.Kind == MessageKind.ChannelIconChange)
|
|
|
|
else if (message.Kind == MessageKind.ChannelIconChange)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> changed the channel icon.</span>
|
|
|
|
<span>changed the channel icon.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (message.Kind == MessageKind.ChannelPinnedMessage && message.Reference is not null)
|
|
|
|
else if (message.Kind == MessageKind.ChannelPinnedMessage && message.Reference is not null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> pinned</span>
|
|
|
|
<span>pinned</span>
|
|
|
|
<a class="chatlog__system-notification-link" href="#chatlog__message-container-@message.Reference.MessageId"> a message</a>
|
|
|
|
<a class="chatlog__system-notification-link" href="#chatlog__message-container-@message.Reference.MessageId"> a message</a>
|
|
|
|
<span> to this channel.</span>
|
|
|
|
<span> to this channel.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (message.Kind == MessageKind.ThreadCreated)
|
|
|
|
else if (message.Kind == MessageKind.ThreadCreated)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> started a thread.</span>
|
|
|
|
<span>started a thread.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (message.Kind == MessageKind.GuildMemberJoin)
|
|
|
|
else if (message.Kind == MessageKind.GuildMemberJoin)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> joined the server.</span>
|
|
|
|
<span>joined the server.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span> </span>
|
|
|
|
|
|
|
|
<span>@message.Content.ToLowerInvariant()</span>
|
|
|
|
<span>@message.Content.ToLowerInvariant()</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|