ShowHiddenChannels: Fix incorrect allowed users and roles component
This commit is contained in:
parent
98efe13b97
commit
c7e799e935
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
// 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).+?)/,
|
match: /return\(0,\i\.jsxs?\)\(\i\.\i,{channelId:(\i)\.id(?=.+?(\(0,\i\.jsxs?\)\("div",{className:\i\.members.+?\]}\)),)/,
|
||||||
replace: (m, channel) => `${m}$self.isHiddenChannel(${channel},true)?null:`
|
replace: (m, channel, allowedUsersAndRolesComponent) => `if($self.isHiddenChannel(${channel},true)){return${allowedUsersAndRolesComponent};}${m}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Export the channel for the users allowed component patch
|
// Export the channel for the users allowed component patch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue