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":2022189063106399633,"last_updated":{"seconds":1693028012,"nanos":957817000}}
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 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1 [FBAN/FBIOS;FBAV/68.0.0.49.70;FBBV/41924288;FBRV/0;FBDV/iPhone9,4;FBMD/iPhone;FBSN/iOS;FBSV/9.3.5;FBSS/2;FBCR/carrier;FBID/phone;FBLC/en_US;FBOP/5]"
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alicezetion",
3
- "version": "1.2.9",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "mocha",