alicezetion 1.2.9 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"nonce":
|
1
|
+
{"nonce":4049996291380312265,"last_updated":{"seconds":1693028251,"nanos":279943000}}
|
package/index.js
CHANGED
@@ -119,12 +119,15 @@ function buildAPI(globalOptions, html, jar) {
|
|
119
119
|
irisSeqID = newFBMQTTMatch[2];
|
120
120
|
mqttEndpoint = newFBMQTTMatch[1].replace(/\\\//g, "/");
|
121
121
|
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
122
|
+
log.info("login", `Got this account's message region: ${region}`);
|
122
123
|
} else {
|
123
124
|
let legacyFBMQTTMatch = html.match(/(\["MqttWebConfig",\[\],{fbid:")(.+?)(",appID:219994525426954,endpoint:")(.+?)(",pollingEndpoint:")(.+?)(3790])/);
|
124
125
|
if (legacyFBMQTTMatch) {
|
125
126
|
mqttEndpoint = legacyFBMQTTMatch[4];
|
126
127
|
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
127
128
|
log.warn("login", `Cannot get sequence ID with new RegExp. Fallback to old RegExp (without seqID)...`);
|
129
|
+
log.info("login", `Got this account's message region: ${region}`);
|
130
|
+
log.info("login", `[Unused] Polling endpoint: ${legacyFBMQTTMatch[6]}`);
|
128
131
|
} else {
|
129
132
|
log.warn("login", "» Cannot get MQTT region & sequence ID.");
|
130
133
|
log.error("login", "» Please try closing and reopening your browser window or get new fbstate.");
|
@@ -366,6 +369,7 @@ function makeLogin(jar, email, password, loginOptions, callback, prCallback) {
|
|
366
369
|
JSON.parse(res.body.replace(/for\s*\(\s*;\s*;\s*\)\s*;\s*/, ""));
|
367
370
|
} catch (ex) {
|
368
371
|
clearInterval(checkVerified);
|
372
|
+
log.info("login", "Verified from browser. Logging in...");
|
369
373
|
if (callback === prCallback) {
|
370
374
|
callback = function(err, api) {
|
371
375
|
if (err) return prReject(err);
|
@@ -511,7 +515,7 @@ function login(loginData, options, callback) {
|
|
511
515
|
logRecordSize: defaultLogRecordSize,
|
512
516
|
online: false,
|
513
517
|
emitReady: false,
|
514
|
-
userAgent: "Mozilla/5.0 (
|
518
|
+
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/8.0.3 Safari/600.3.18"
|
515
519
|
};
|
516
520
|
|
517
521
|
setOptions(globalOptions, options);
|