mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 05:55:21 -04:00
parent
de9e7caaeb
commit
6f1c944cb3
2 changed files with 6 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace DiscordChatExporter.Core.Models
|
namespace DiscordChatExporter.Core.Models
|
||||||
{
|
{
|
||||||
// https://discordapp.com/developers/docs/topics/permissions#role-object
|
// https://discordapp.com/developers/docs/resources/user#user-object
|
||||||
|
|
||||||
public partial class User : IHasId
|
public partial class User : IHasId
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,11 @@ namespace DiscordChatExporter.Core.Rendering.Logic
|
||||||
{
|
{
|
||||||
public static bool CanBeGrouped(Message message1, Message message2)
|
public static bool CanBeGrouped(Message message1, Message message2)
|
||||||
{
|
{
|
||||||
if (message1.Author.Id != message2.Author.Id)
|
if (!string.Equals(message1.Author.Id, message2.Author.Id, StringComparison.Ordinal))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Bots can post message under different usernames, so need to check this too
|
||||||
|
if (!string.Equals(message1.Author.FullName, message2.Author.FullName, StringComparison.Ordinal))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((message2.Timestamp - message1.Timestamp).Duration().TotalMinutes > 7)
|
if ((message2.Timestamp - message1.Timestamp).Duration().TotalMinutes > 7)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue