Fix broken FakeNitro patch on canary

This commit is contained in:
Nuckyz 2023-09-12 05:01:18 -03:00
parent 09f65b401e
commit 4222c7fd9f
No known key found for this signature in database
GPG Key ID: 440BF8296E1C4AD9

@ -212,15 +212,15 @@ export default definePlugin({
} }
}, },
{ {
find: "canStreamHighQuality:function", find: "canUseHighVideoUploadQuality:function",
predicate: () => settings.store.enableStreamQualityBypass, predicate: () => settings.store.enableStreamQualityBypass,
replacement: [ replacement: [
"canUseHighVideoUploadQuality", "canUseHighVideoUploadQuality",
"canStreamHighQuality", // TODO: Remove the last two when they get removed from stable
"canStreamMidQuality" "(?:canStreamQuality|canStreamHighQuality|canStreamMidQuality)",
].map(func => { ].map(func => {
return { return {
match: new RegExp(`${func}:function\\(\\i\\){`), match: new RegExp(`${func}:function\\(\\i(?:,\\i)?\\){`),
replace: "$&return true;" replace: "$&return true;"
}; };
}) })