From 7b248ee30952eccd880a93dfe1209d8da188b809 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 15 Nov 2023 14:50:52 -0300 Subject: [PATCH] Fix SHC patches --- src/plugins/showHiddenChannels/index.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 95b16d62..4e275d64 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -68,7 +68,7 @@ export default definePlugin({ patches: [ { // RenderLevel defines if a channel is hidden, collapsed in category, visible, etc - find: ".CannotShow=", + find: '"placeholder-channel-id"', replacement: [ // Remove the special logic for channels we don't have access to { @@ -82,13 +82,8 @@ export default definePlugin({ }, // Make channels we dont have access to be the same level as normal ones { - match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/, - replace: (_, renderLevelExpression) => renderLevelExpression - }, - // Make channels we dont have access to be the same level as normal ones - { - match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/, - replace: (_, RenderLevels) => `${RenderLevels}.Show` + match: /(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g, + replace: (_, rest, defaultRenderLevel) => `${rest}${defaultRenderLevel}` }, // Remove permission checking for getRenderLevel function {