From 4222c7fd9f0bc7b23f121b78d1f33a811a10f7ad Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 12 Sep 2023 05:01:18 -0300 Subject: [PATCH] Fix broken FakeNitro patch on canary --- src/plugins/fakeNitro.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/fakeNitro.ts b/src/plugins/fakeNitro.ts index d74a6c0c..669da191 100644 --- a/src/plugins/fakeNitro.ts +++ b/src/plugins/fakeNitro.ts @@ -212,15 +212,15 @@ export default definePlugin({ } }, { - find: "canStreamHighQuality:function", + find: "canUseHighVideoUploadQuality:function", predicate: () => settings.store.enableStreamQualityBypass, replacement: [ "canUseHighVideoUploadQuality", - "canStreamHighQuality", - "canStreamMidQuality" + // TODO: Remove the last two when they get removed from stable + "(?:canStreamQuality|canStreamHighQuality|canStreamMidQuality)", ].map(func => { return { - match: new RegExp(`${func}:function\\(\\i\\){`), + match: new RegExp(`${func}:function\\(\\i(?:,\\i)?\\){`), replace: "$&return true;" }; })