From fb22c57da13c5033d4d1764aabe355c0f509a4b4 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 25 Oct 2023 15:28:50 +0200 Subject: [PATCH] MessageAccessoriesAPI: Fix --- src/plugins/_api/messageAccessories.ts | 5 ++--- src/webpack/webpack.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/_api/messageAccessories.ts b/src/plugins/_api/messageAccessories.ts index 5bb13cfe1..a98fdb32b 100644 --- a/src/plugins/_api/messageAccessories.ts +++ b/src/plugins/_api/messageAccessories.ts @@ -27,9 +27,8 @@ export default definePlugin({ { find: ".Messages.REMOVE_ATTACHMENT_BODY", replacement: { - match: /(.container\)?,children:)(\[[^\]]+\])(}\)\};return)/, - replace: (_, pre, accessories, post) => - `${pre}Vencord.Api.MessageAccessories._modifyAccessories(${accessories},this.props)${post}`, + match: /(?<=.container\)?,children:)(\[.+?\])/, + replace: "Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)", }, }, ], diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index 1fdfa43e9..812e36079 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -458,7 +458,7 @@ export function extract(id: number) { // WARNING: This module was extracted to be more easily readable. // This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!! -${mod.toString()} +0,${mod.toString()} //# sourceURL=ExtractedWebpackModule${id} `; const extracted = (0, eval)(code);