PlatformSpoofer: Fix Broken Spoofing

This commit is contained in:
thororen1234 2026-04-10 21:28:58 -04:00
parent 3a5bd94de0
commit dd71aaa31f
No known key found for this signature in database

View file

@ -62,18 +62,17 @@ export default definePlugin({
patches: [ patches: [
{ {
find: "_doIdentify(){", find: "_doIdentify(){",
replacement: { replacement: [
match: /(\[IDENTIFY\].*let.{0,5}=\{.*properties:)(.*),presence/, {
replace: "$1{...$2,...$self.getPlatform(true)},presence" match: /window._ws=null,null!=\i/,
} replace: "false"
},
{
match: /(?<="GatewaySocket"\)\}\),properties:)(\i)/,
replace: "{...$1,...$self.getPlatform(true)}"
},
]
}, },
{
find: '("AppSkeleton");',
replacement: {
match: /(?<=\.isPlatformEmbedded.{0,50}\i\)\)\}.{0,30})\i\?\i\.\i\.set\(.{0,10}:/,
replace: ""
}
}
], ],
getPlatform(bypass, userId?: any) { getPlatform(bypass, userId?: any) {
const platform = settings.store.platform ?? "desktop"; const platform = settings.store.platform ?? "desktop";