diff --git a/src/plugins/anonymiseFileNames/index.tsx b/src/plugins/anonymiseFileNames/index.tsx index 91144023..b424b7a5 100644 --- a/src/plugins/anonymiseFileNames/index.tsx +++ b/src/plugins/anonymiseFileNames/index.tsx @@ -78,6 +78,13 @@ export default definePlugin({ "uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),", }, }, + { + find: "message.attachments", + replacement: { + match: /(\i.uploadFiles\((\i),)/, + replace: "$2.forEach(f=>f.filename=$self.anonymise(f)),$1" + } + }, { find: ".Messages.ATTACHMENT_UTILITIES_SPOILER", replacement: {