fix plugins patching the message popover

This commit is contained in:
Vendicated 2026-09-27 19:21:57 +02:00
parent 17907c8032
commit e4c04f6dc9
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
3 changed files with 5 additions and 4 deletions

View file

@ -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,`
}

View file

@ -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)"

View file

@ -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&&(.+?),/,