1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-09 17:36:23 +00:00

don't add duplicate msgs

This commit is contained in:
Eric 2024-09-23 19:01:42 -04:00 committed by GitHub
parent a12ca5b04f
commit a8016f1bfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,15 +49,18 @@ function findReplies(message: Message) {
if (new Date(other.timestamp.toString()).getTime() <= new Date(message.timestamp.toString()).getTime()) continue;
if (other.messageReference?.message_id === message.id) {
found.push(other);
continue;
}
if (Vencord.Settings.plugins.FindReply.includePings) {
if (other.content?.includes(`<@${message.author.id}>`)) {
found.push(other);
continue;
}
}
if (Vencord.Settings.plugins.FindReply.includeAuthor) {
if (messages.find(m => m.id === other.messageReference?.message_id)?.author.id === message.author.id) {
found.push(other);
continue;
}
}
}