Skip to content

Commit

Permalink
Fix SHC patches
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckyz committed Nov 15, 2023
1 parent fd25b5f commit 7b248ee
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/plugins/showHiddenChannels/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down

0 comments on commit 7b248ee

Please sign in to comment.