From 869e71112e1555097ba453e227f8404d7c18ad12 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 23 May 2024 03:26:23 +0200 Subject: [PATCH] fix AnonymiseFilenames --- src/plugins/anonymiseFileNames/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/anonymiseFileNames/index.tsx b/src/plugins/anonymiseFileNames/index.tsx index b424b7a59..526ccd12e 100644 --- a/src/plugins/anonymiseFileNames/index.tsx +++ b/src/plugins/anonymiseFileNames/index.tsx @@ -73,13 +73,13 @@ export default definePlugin({ { find: "instantBatchUpload:function", replacement: { - match: /uploadFiles:(.{1,2}),/, + match: /uploadFiles:(\i),/, replace: "uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),", }, }, { - find: "message.attachments", + find: 'addFilesTo:"message.attachments"', replacement: { match: /(\i.uploadFiles\((\i),)/, replace: "$2.forEach(f=>f.filename=$self.anonymise(f)),$1"