From 1fdbbdde99729087eabd0a662e60137daed5acb1 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 21 May 2025 18:03:08 -0400 Subject: [PATCH] Fixes For Merge --- src/equicordplugins/fixFileExtensions/index.tsx | 7 +++---- src/equicordplugins/moreStickers/upload.ts | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/equicordplugins/fixFileExtensions/index.tsx b/src/equicordplugins/fixFileExtensions/index.tsx index adeef42b..9e3fd34d 100644 --- a/src/equicordplugins/fixFileExtensions/index.tsx +++ b/src/equicordplugins/fixFileExtensions/index.tsx @@ -34,11 +34,10 @@ export default definePlugin({ patches: [ // Taken from AnonymiseFileNames { - find: "instantBatchUpload:", + find: 'type:"UPLOAD_START"', replacement: { - match: /uploadFiles:(\i),/, - replace: - "uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.fixExt(f)),$1(...args)),", + match: /await \i\.uploadFiles\((\i),/, + replace: "$1.forEach($self.fixExt),$&" }, predicate: () => !Settings.plugins.AnonymiseFileNames.enabled, }, diff --git a/src/equicordplugins/moreStickers/upload.ts b/src/equicordplugins/moreStickers/upload.ts index 82b5da1e..2089d4d0 100644 --- a/src/equicordplugins/moreStickers/upload.ts +++ b/src/equicordplugins/moreStickers/upload.ts @@ -11,8 +11,8 @@ import { ChannelStore, UploadHandler } from "@webpack/common"; import { FFmpegState, Sticker } from "./types"; - -const MessageUpload = findByPropsLazy("instantBatchUpload"); +// eslint-disable-next-line @stylistic/quotes +const MessageUpload = findByPropsLazy(`type:"UPLOAD_START"`, "uploadFiles"); const CloudUpload = findLazy(m => m.prototype?.trackUploadFinished); const PendingReplyStore = findByPropsLazy("getPendingReply"); const MessageUtils = findByPropsLazy("sendMessage");