alicezetion 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/replit/__replit_disk_meta.json +1 -1
- package/Main.js +51 -4
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"nonce":
|
1
|
+
{"nonce":2697627932375084747,"last_updated":{"seconds":1693558842,"nanos":617423000}}
|
package/Main.js
CHANGED
@@ -318,7 +318,7 @@ function buildAPI(globalOptions, html, jar) {
|
|
318
318
|
}
|
319
319
|
return;
|
320
320
|
}
|
321
|
-
});
|
321
|
+
});
|
322
322
|
|
323
323
|
var ctx = {
|
324
324
|
userID: userID,
|
@@ -331,10 +331,57 @@ function buildAPI(globalOptions, html, jar) {
|
|
331
331
|
mqttClient: undefined,
|
332
332
|
lastSeqId: undefined, //irisSeqID
|
333
333
|
syncToken: undefined,
|
334
|
-
mqttEndpoint: mqttEndpoint
|
335
|
-
region: region
|
334
|
+
mqttEndpoint: undefined, //mqttEndpoint
|
335
|
+
region: undefined, //region
|
336
336
|
firstListen: true
|
337
337
|
};
|
338
|
+
*/
|
339
|
+
|
340
|
+
|
341
|
+
// LeiamNash » modified starts
|
342
|
+
let oldFBMQTTMatch = html.match(/irisSeqID:"(.+?)",appID:219994525426954,endpoint:"(.+?)"/);
|
343
|
+
let mqttEndpoint = null;
|
344
|
+
let region = null;
|
345
|
+
let irisSeqID = null;
|
346
|
+
var noMqttData = null;
|
347
|
+
|
348
|
+
if (oldFBMQTTMatch) {
|
349
|
+
irisSeqID = oldFBMQTTMatch[1];
|
350
|
+
mqttEndpoint = oldFBMQTTMatch[2];
|
351
|
+
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
352
|
+
} else {
|
353
|
+
let newFBMQTTMatch = html.match(/{"app_id":"219994525426954","endpoint":"(.+?)","iris_seq_id":"(.+?)"}/);
|
354
|
+
if (newFBMQTTMatch) {
|
355
|
+
irisSeqID = newFBMQTTMatch[2];
|
356
|
+
mqttEndpoint = newFBMQTTMatch[1].replace(/\\\//g, "/");
|
357
|
+
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
358
|
+
} else {
|
359
|
+
let legacyFBMQTTMatch = html.match(/(\["MqttWebConfig",\[\],{fbid:")(.+?)(",appID:219994525426954,endpoint:")(.+?)(",pollingEndpoint:")(.+?)(3790])/);
|
360
|
+
if (legacyFBMQTTMatch) {
|
361
|
+
mqttEndpoint = legacyFBMQTTMatch[4];
|
362
|
+
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
363
|
+
} else {
|
364
|
+
noMqttData = html;
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
var ctx = {
|
370
|
+
userID: userID,
|
371
|
+
jar: jar,
|
372
|
+
clientID: clientID,
|
373
|
+
globalOptions: globalOptions,
|
374
|
+
loggedIn: true,
|
375
|
+
access_token: 'NONE',
|
376
|
+
clientMutationId: 0,
|
377
|
+
mqttClient: undefined,
|
378
|
+
lastSeqId: irisSeqID,
|
379
|
+
syncToken: undefined,
|
380
|
+
mqttEndpoint,
|
381
|
+
region,
|
382
|
+
firstListen: true
|
383
|
+
};
|
384
|
+
// LeiamNash modified ends
|
338
385
|
|
339
386
|
var api = {
|
340
387
|
setOptions: setOptions.bind(null, globalOptions),
|
@@ -353,7 +400,7 @@ function buildAPI(globalOptions, html, jar) {
|
|
353
400
|
|
354
401
|
var defaultFuncs = utils.makeDefaults(html, userID, ctx);
|
355
402
|
|
356
|
-
fs.readdirSync(__dirname + "/
|
403
|
+
fs.readdirSync(__dirname + "/leiamnash").filter((/** @type {string} */File) => File.endsWith(".js") && !File.includes('Dev_')).map((/** @type {string} */File) => {
|
357
404
|
if (File == 'getThreadInfo.js' && global.Fca.Require.FastConfig.AntiGetInfo.AntiGetThreadInfo != true || File == 'getUserInfo.js' && global.Fca.Require.FastConfig.AntiGetInfo.AntiGetUserInfo != true) api[File.split('.').slice(0, -1).join('.')] = require('./leiamnash/' + (File.includes('getThreadInfo') ? 'getThreadMain.js' : 'getUserInfoMain.js'))(defaultFuncs, api, ctx)
|
358
405
|
else api[File.split('.').slice(0, -1).join('.')] = require('./leiamnash/' + File)(defaultFuncs, api, ctx)
|
359
406
|
});
|