From 021d9bf179476f630552a9418b683143f0482f31 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 3 Aug 2024 17:54:25 +0200 Subject: [PATCH] fix message hover buttons... again --- src/api/MessagePopover.tsx | 6 +++--- src/plugins/_api/messagePopover.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/MessagePopover.tsx b/src/api/MessagePopover.tsx index 0a4a0540..eb68ed2d 100644 --- a/src/api/MessagePopover.tsx +++ b/src/api/MessagePopover.tsx @@ -50,18 +50,18 @@ export function removeButton(identifier: string) { export function _buildPopoverElements( Component: React.ComponentType, - props: { message: Message; } + message: Message ) { const items: React.ReactNode[] = []; for (const [identifier, getItem] of buttons.entries()) { try { - const item = getItem(props.message); + const item = getItem(message); if (item) { item.key ??= identifier; items.push( - + ); } diff --git a/src/plugins/_api/messagePopover.ts b/src/plugins/_api/messagePopover.ts index 9998a46b..2b0b0c79 100644 --- a/src/plugins/_api/messagePopover.ts +++ b/src/plugins/_api/messagePopover.ts @@ -27,7 +27,7 @@ export default definePlugin({ find: "Messages.MESSAGE_UTILITIES_A11Y_LABEL", replacement: { // foo && !bar ? createElement(reactionStuffs)... createElement(blah,...makeElement(reply-other)) - match: /\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?\(0,\i\.jsx\)\((\i\.\i).{0,200}\.\.\.(\i)\},"reply-other"/, + match: /\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?\(0,\i\.jsx\)\((\i\.\i).{0,200},"reply-other"(?<=message:(\i).+?)/, replace: "Vencord.Api.MessagePopover._buildPopoverElements($1,$2),$&" } }],