From c7e799e9352637bad2086f64553e08b7ff6f460c Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 7 Aug 2025 09:29:33 -0300 Subject: [PATCH] ShowHiddenChannels: Fix incorrect allowed users and roles component --- src/plugins/showHiddenChannels/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index b8075d8c..33f44657 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -301,8 +301,8 @@ export default definePlugin({ }, { // Patch the header to only return allowed users and roles if it's a hidden channel or locked channel (Like when it's used on the HiddenChannelLockScreen) - match: /\.members.+?\]}\),(?<=channel:(\i).+?)/, - replace: (m, channel) => `${m}$self.isHiddenChannel(${channel},true)?null:` + match: /return\(0,\i\.jsxs?\)\(\i\.\i,{channelId:(\i)\.id(?=.+?(\(0,\i\.jsxs?\)\("div",{className:\i\.members.+?\]}\)),)/, + replace: (m, channel, allowedUsersAndRolesComponent) => `if($self.isHiddenChannel(${channel},true)){return${allowedUsersAndRolesComponent};}${m}` }, { // Export the channel for the users allowed component patch