Fix NoScreensharePreview

This commit is contained in:
Vendicated 2023-10-26 00:20:56 +02:00
parent 96dff84ed8
commit 45fa4f89c6
No known key found for this signature in database
GPG Key ID: D66986BAF75ECF18

@ -25,14 +25,11 @@ export default definePlugin({
authors: [Devs.Nuckyz],
patches: [
{
find: '("ApplicationStreamPreviewUploadManager")',
replacement: [
String.raw`\i\.\i\.makeChunkedRequest\(`,
String.raw`\i\.\i\.post\({url:`
].map(match => ({
match: new RegExp(String.raw`(?=return\[(\d),${match}\i\.\i\.STREAM_PREVIEW.+?}\)\];)`),
replace: (_, code) => `return[${code},Promise.resolve({body:"",status:204})];`
}))
find: '"ApplicationStreamPreviewUploadManager"',
replacement: {
match: /await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,
replace: "0"
}
}
]
});