From aa7eb770506f5456adae1f2becbd284d812fe3e2 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 31 May 2024 23:41:38 -0300 Subject: [PATCH] ShowHiddenChannels: Fix patch --- src/plugins/secretRingTone/index.ts | 5 ++--- src/plugins/showHiddenChannels/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/secretRingTone/index.ts b/src/plugins/secretRingTone/index.ts index 9c3956a8..be804efc 100644 --- a/src/plugins/secretRingTone/index.ts +++ b/src/plugins/secretRingTone/index.ts @@ -16,9 +16,8 @@ export default definePlugin({ { find: '"call_ringing_beat"', replacement: { - // FIXME Remove === alternative when it hits stable - match: /500(!==|===)\i\(\)\.random\(1,1e3\)/, - replace: (_, predicate) => predicate === "!==" ? "false" : "true", + match: /500!==\i\(\)\.random\(1,1e3\)/, + replace: "false", } }, ], diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index c120d72d..35d56091 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -73,8 +73,9 @@ export default definePlugin({ find: '"placeholder-channel-id"', replacement: [ // Remove the special logic for channels we don't have access to + // FIXME Remove variable matcher from threadsIds when it hits stable { - match: /if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/, + match: /if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:(?:\[\]|\i)}}/, replace: "" }, // Do not check for unreads when selecting the render level if the channel is hidden