From 710c3916971d845edb9a7f2683a7df7421d7fe22 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Tue, 24 Feb 2026 18:41:37 -0500 Subject: [PATCH] fix VolumeBooster & UserVoiceShow (#4003) --- src/plugins/userVoiceShow/index.tsx | 4 ++-- src/plugins/volumeBooster/index.ts | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/plugins/userVoiceShow/index.tsx b/src/plugins/userVoiceShow/index.tsx index 039982dd7..5a9a85add 100644 --- a/src/plugins/userVoiceShow/index.tsx +++ b/src/plugins/userVoiceShow/index.tsx @@ -59,8 +59,8 @@ export default definePlugin({ { find: "#{intl::USER_PROFILE_PRONOUNS}", replacement: { - match: /(\i).isVerifiedBot\(\)}\),/, - replace: "$&$self.VoiceChannelIndicator({userId:$1.id,isProfile:true})," + match: /(?<=children:\[\i," ",\i)(?=\])/, + replace: ",$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id,isProfile:true})" }, predicate: () => settings.store.showInUserProfileModal }, diff --git a/src/plugins/volumeBooster/index.ts b/src/plugins/volumeBooster/index.ts index 81dcf6633..4ab0c332a 100644 --- a/src/plugins/volumeBooster/index.ts +++ b/src/plugins/volumeBooster/index.ts @@ -55,16 +55,21 @@ export default definePlugin({ patches: [ // Change the max volume for sliders to allow for values above 200 - ...[ - "#{intl::USER_VOLUME}", - "currentVolume:" - ].map(find => ({ - find, + { + find: "#{intl::USER_VOLUME}", replacement: { - match: /(?<=maxValue:)\i\.\i\?(\d+?):(\d+?)(?=,)/, - replace: (_, higherMaxVolume, minorMaxVolume) => `${higherMaxVolume}*$self.settings.store.multiplier` + match: /(?<=maxValue:)\i\.isPlatformEmbedded\?(\i\.\i):\i\.\i(?=,)/, + replace: (_, higherMaxVolume) => `${higherMaxVolume}*$self.settings.store.multiplier` } - })), + }, + // Change the max volume for sliders to allow for values above 200 + { + find: "currentVolume:", + replacement: { + match: /(?<=maxValue:)\i\.\i\?(\d+?):\d+?(?=,)/, + replace: (_, higherMaxVolume) => `${higherMaxVolume}*$self.settings.store.multiplier` + } + }, // Patches needed for web/vesktop { find: "streamSourceNode",