From daa48d1e791e9cc666ce7f8c633631fbd3dc941e Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Wed, 29 Apr 2026 22:20:09 -0400 Subject: [PATCH] fix CallTimer, ReviewDB, SHC & ImplicitRelationships (#4158) Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com> Co-authored-by: prism --- src/plugins/callTimer/index.tsx | 4 ++-- src/plugins/implicitRelationships/index.ts | 2 +- src/plugins/noMosaic/index.ts | 7 ------- src/plugins/reviewDB/index.tsx | 2 +- src/plugins/showConnections/index.tsx | 2 +- src/plugins/showHiddenChannels/index.tsx | 6 +++--- src/plugins/voiceMessages/index.tsx | 2 +- 7 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/plugins/callTimer/index.tsx b/src/plugins/callTimer/index.tsx index 7e7457663..cddcab1fb 100644 --- a/src/plugins/callTimer/index.tsx +++ b/src/plugins/callTimer/index.tsx @@ -80,8 +80,8 @@ export default definePlugin({ find: "renderConnectionStatus(){", replacement: { // in renderConnectionStatus() - match: /(lineClamp:1,children:)(\i)(?=,|}\))/, - replace: "$1[$2,$self.renderTimer(this.props.channel.id)]" + match: /(renderConnectionStatus\(\).{0,1000}?lineClamp:1,children:)(\i)(?=,|}\))/, + replace: "$1[$2,$self.renderTimer(this.props?.channel?.id)]" } }], diff --git a/src/plugins/implicitRelationships/index.ts b/src/plugins/implicitRelationships/index.ts index 14126c7e3..3af463e3f 100644 --- a/src/plugins/implicitRelationships/index.ts +++ b/src/plugins/implicitRelationships/index.ts @@ -96,7 +96,7 @@ export default definePlugin({ { find: ".REQUEST_GUILD_MEMBERS,", replacement: { - match: /\.send\(\i\.REQUEST_GUILD_MEMBERS,{/, + match: /\.send\(\i\.\i\.REQUEST_GUILD_MEMBERS,{/, replace: "$&nonce:arguments[1].nonce," } }, diff --git a/src/plugins/noMosaic/index.ts b/src/plugins/noMosaic/index.ts index b360e1ea1..90b74b927 100644 --- a/src/plugins/noMosaic/index.ts +++ b/src/plugins/noMosaic/index.ts @@ -27,13 +27,6 @@ export default definePlugin({ settings, patches: [ - { - find: '"PLAINTEXT_PREVIEW":"OTHER"', - replacement: { - match: /return"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i)\|\|\i&&"CLIP"===\i)?/, - replace: (_, visualPlaceholderPred) => visualPlaceholderPred != null ? `return ${visualPlaceholderPred}` : "return false" - } - }, { find: "renderAttachments(", predicate: () => settings.store.inlineVideo, diff --git a/src/plugins/reviewDB/index.tsx b/src/plugins/reviewDB/index.tsx index 78332f91f..65009b098 100644 --- a/src/plugins/reviewDB/index.tsx +++ b/src/plugins/reviewDB/index.tsx @@ -94,7 +94,7 @@ export default definePlugin({ { // User popout // Same find as ShowConnections - find: "#{intl::XcTHmQ::raw}", + find: "#{intl::USER_PROFILE_FRIEND_REQUEST_TOAST}", replacement: { match: /user:(\i),widgets:.{0,100}?\}\),/, replace: "$&$self.renderProfileComponent({user:$1})," diff --git a/src/plugins/showConnections/index.tsx b/src/plugins/showConnections/index.tsx index 4e4196068..a5ce1863a 100644 --- a/src/plugins/showConnections/index.tsx +++ b/src/plugins/showConnections/index.tsx @@ -162,7 +162,7 @@ export default definePlugin({ patches: [ { // Same find as ReviewDB - find: "#{intl::XcTHmQ::raw}", + find: "#{intl::USER_PROFILE_FRIEND_REQUEST_TOAST}", replacement: { match: /userId:\i\.id,guild:\i\}\)(?=])/, replace: "$&,$self.profilePopoutComponent(arguments[0])" diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 8264a5ea5..d0735efef 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -157,8 +157,8 @@ export default definePlugin({ predicate: () => settings.store.showMode === ShowMode.LockIcon, replacement: { // Lock Icon - match: /(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/, - replace: (_, channel) => `if($self.isHiddenChannel(${channel}))return $self.LockIcon;` + match: /(?<=(\i)\.isNSFW\(\);)switch\(\i\.type\)/, + replace: (m, channel) => `if($self.isHiddenChannel(${channel}))return $self.LockIcon;${m}` } }, { @@ -217,7 +217,7 @@ export default definePlugin({ }, { // Make the state of the old version of unreads box not include hidden channels - find: "ignoreRecents:!0", + find: "GUILD_EVENT)}),[", replacement: { match: /(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/, replace: "&&!$self.isHiddenChannel($1)" diff --git a/src/plugins/voiceMessages/index.tsx b/src/plugins/voiceMessages/index.tsx index 6ab387ea2..1b60189eb 100644 --- a/src/plugins/voiceMessages/index.tsx +++ b/src/plugins/voiceMessages/index.tsx @@ -83,7 +83,7 @@ export default definePlugin({ patches: [ { - find: "#{intl::3XohGn::raw}", + find: "#{intl::PAUSE_VOICE_MESSAGE_A11Y_LABEL}", replacement: { match: /(?<=\i=)(?=\i\.memo\(.{0,50}?=1,onVolumeChange:[^}]+?waveform:[^}]+?playbackCacheKey:)/, replace: "$self.VoiceMessage=",