alicezetion 1.2.3 → 1.2.5
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.
@@ -1 +1 @@
|
|
1
|
-
{"nonce":
|
1
|
+
{"nonce":6928808597510966173,"last_updated":{"seconds":1693007708,"nanos":164183000}}
|
package/index.js
CHANGED
@@ -121,6 +121,8 @@ function buildAPI(globalOptions, html, jar) {
|
|
121
121
|
if (legacyFBMQTTMatch) {
|
122
122
|
mqttEndpoint = legacyFBMQTTMatch[4];
|
123
123
|
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
124
|
+
log.warn("login", `Cannot get sequence ID with new RegExp. Fallback to old RegExp (without seqID)...`);
|
125
|
+
log.info("login", `[Unused] Polling endpoint: ${legacyFBMQTTMatch[6]}`);
|
124
126
|
} else {
|
125
127
|
log.warn("login", "» Cannot get MQTT region & sequence ID.");
|
126
128
|
log.error("login", "» Please try closing and reopening your browser window or get new fbstate.");
|
@@ -259,6 +261,7 @@ function makeLogin(jar, email, password, loginOptions, callback, prCallback) {
|
|
259
261
|
jar.setCookie(utils.formatCookie(cookieData, "facebook"), "https://www.facebook.com");
|
260
262
|
});
|
261
263
|
// ---------- Very Hacky Part Ends -----------------
|
264
|
+
|
262
265
|
return utils
|
263
266
|
.post("https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110", jar, form, loginOptions)
|
264
267
|
.then(utils.saveCookies(jar))
|
@@ -322,9 +325,10 @@ function makeLogin(jar, email, password, loginOptions, callback, prCallback) {
|
|
322
325
|
}
|
323
326
|
})
|
324
327
|
.then(function() {
|
328
|
+
// Use the same form (safe I hope)
|
325
329
|
delete form.no_fido;
|
326
330
|
delete form.approvals_code;
|
327
|
-
form.name_action_selected = 'save_device';
|
331
|
+
form.name_action_selected = 'dont_save'; //'save_device';
|
328
332
|
|
329
333
|
return utils.post(nextURL, jar, form, loginOptions).then(utils.saveCookies(jar));
|
330
334
|
})
|
@@ -359,6 +363,7 @@ function makeLogin(jar, email, password, loginOptions, callback, prCallback) {
|
|
359
363
|
JSON.parse(res.body.replace(/for\s*\(\s*;\s*;\s*\)\s*;\s*/, ""));
|
360
364
|
} catch (ex) {
|
361
365
|
clearInterval(checkVerified);
|
366
|
+
log.info("login", "Verified from browser. Logging in...");
|
362
367
|
if (callback === prCallback) {
|
363
368
|
callback = function(err, api) {
|
364
369
|
if (err) return prReject(err);
|
@@ -496,9 +501,9 @@ function login(loginData, options, callback) {
|
|
496
501
|
listenEvents: true,
|
497
502
|
listenTyping: false,
|
498
503
|
updatePresence: false,
|
499
|
-
forceLogin:
|
504
|
+
forceLogin: false,
|
500
505
|
autoMarkDelivery: false,
|
501
|
-
autoMarkRead:
|
506
|
+
autoMarkRead: true,
|
502
507
|
autoReconnect: true,
|
503
508
|
logRecordSize: defaultLogRecordSize,
|
504
509
|
online: true,
|