diff --git a/src/plugins/anonymiseFileNames/index.tsx b/src/plugins/anonymiseFileNames/index.tsx index 911440230..b424b7a59 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: {