From b0880ba7af5907af0c23166d852184292255cda9 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Thu, 25 Apr 2024 12:58:13 -0400 Subject: [PATCH] Shorten match --- src/equicordplugins/messageLoggerEnhanced/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/equicordplugins/messageLoggerEnhanced/index.tsx b/src/equicordplugins/messageLoggerEnhanced/index.tsx index b4b98efe..09348d44 100644 --- a/src/equicordplugins/messageLoggerEnhanced/index.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/index.tsx @@ -620,7 +620,7 @@ export default definePlugin({ { find: ".removeMosaicItemHoverButton", replacement: { - match: /(\i=(\i)=>{)(.{1,6500}isSingleMosaicItem)/, + match: /(\i=(\i)=>{)(.{1,3550}isSingleMosaicItem)/, replace: "$1 let forceUpdate=Vencord.Util.useForceUpdater();$self.patchAttachments($2,forceUpdate);$3" } }, @@ -701,7 +701,7 @@ export default definePlugin({ attachments: new Map(), patchAttachments(props: { attachment: LoggedAttachment, message: LoggedMessage; }, forceUpdate: () => void) { const { attachment, message } = props; - if (!message.deleted || !LoggedMessageManager.hasMessageInLogs(message.id)) + if (!message?.deleted || !LoggedMessageManager.hasMessageInLogs(message.id)) return; // Flogger.log("ignoring", message.id); if (this.attachments.has(attachment.id))