From e4c04f6dc9bd1c666fe8d67256f84320060e5ec7 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sun, 27 Sep 2026 19:21:57 +0200 Subject: [PATCH] fix plugins patching the message popover --- src/plugins/_api/messagePopover.ts | 5 +++-- src/plugins/moreQuickReactions/index.ts | 2 +- src/plugins/showAllMessageButtons/index.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/_api/messagePopover.ts b/src/plugins/_api/messagePopover.ts index 7f6c5b938..76de315f5 100644 --- a/src/plugins/_api/messagePopover.ts +++ b/src/plugins/_api/messagePopover.ts @@ -25,9 +25,10 @@ export default definePlugin({ authors: [Devs.KingFish, Devs.Ven, Devs.Nuckyz], patches: [ { - find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}", + find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children", replacement: { - match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/, + // TODO: (\i\.\i|\i) is for stable compat + match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i\.\i|\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/, replace: (_, ReactButton, ButtonComponent, showReactButton, message) => "" + `]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${ButtonComponent},${message}),${showReactButton}?${ReactButton}:null,` } diff --git a/src/plugins/moreQuickReactions/index.ts b/src/plugins/moreQuickReactions/index.ts index e18ffe63f..b2abe02b9 100644 --- a/src/plugins/moreQuickReactions/index.ts +++ b/src/plugins/moreQuickReactions/index.ts @@ -29,7 +29,7 @@ export default definePlugin({ patches: [ { - find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}", + find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children", replacement: { match: /(?<=length>=3\?.{0,40})\.slice\(0,3\)/, replace: ".slice(0,$self.reactionCount)" diff --git a/src/plugins/showAllMessageButtons/index.ts b/src/plugins/showAllMessageButtons/index.ts index 9c4dfa59e..3c18c09c1 100644 --- a/src/plugins/showAllMessageButtons/index.ts +++ b/src/plugins/showAllMessageButtons/index.ts @@ -27,7 +27,7 @@ export default definePlugin({ patches: [ { - find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}", + find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children", replacement: { // isExpanded: isShiftPressed && other conditions... match: /isExpanded:\i&&(.+?),/,