alicezetion 1.1.7 → 1.1.9
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/index.js +1 -5
- package/package.json +1 -1
- package/utils.js +1022 -1186
@@ -1 +1 @@
|
|
1
|
-
{"nonce":
|
1
|
+
{"nonce":4546575442593242169,"last_updated":{"seconds":1693004402,"nanos":174349000}}
|
package/index.js
CHANGED
@@ -94,7 +94,6 @@ function buildAPI(globalOptions, html, jar) {
|
|
94
94
|
if (html.indexOf("/checkpoint/block/?next") > -1) log.warn("login", "Checkpoint detected. Please log in with a browser to verify.");
|
95
95
|
|
96
96
|
var userID = maybeCookie[0].cookieString().split("=")[1].toString();
|
97
|
-
//log.info("login", `Logged in as ${userID}`);
|
98
97
|
|
99
98
|
try {
|
100
99
|
clearInterval(checkVerified);
|
@@ -112,21 +111,18 @@ function buildAPI(globalOptions, html, jar) {
|
|
112
111
|
irisSeqID = oldFBMQTTMatch[1];
|
113
112
|
mqttEndpoint = oldFBMQTTMatch[2];
|
114
113
|
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
115
|
-
//log.info("login", `Got this account's message region: ${region}`);
|
116
114
|
} else {
|
117
115
|
let newFBMQTTMatch = html.match(/{"app_id":"219994525426954","endpoint":"(.+?)","iris_seq_id":"(.+?)"}/);
|
118
116
|
if (newFBMQTTMatch) {
|
119
117
|
irisSeqID = newFBMQTTMatch[2];
|
120
118
|
mqttEndpoint = newFBMQTTMatch[1].replace(/\\\//g, "/");
|
121
119
|
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
122
|
-
log.info("login", `Got this account's message region: ${region}`);
|
123
120
|
} else {
|
124
121
|
let legacyFBMQTTMatch = html.match(/(\["MqttWebConfig",\[\],{fbid:")(.+?)(",appID:219994525426954,endpoint:")(.+?)(",pollingEndpoint:")(.+?)(3790])/);
|
125
122
|
if (legacyFBMQTTMatch) {
|
126
123
|
mqttEndpoint = legacyFBMQTTMatch[4];
|
127
124
|
region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
|
128
125
|
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
126
|
log.info("login", `[Unused] Polling endpoint: ${legacyFBMQTTMatch[6]}`);
|
131
127
|
} else {
|
132
128
|
log.warn("login", "» Cannot get MQTT region & sequence ID.");
|
@@ -221,7 +217,7 @@ function buildAPI(globalOptions, html, jar) {
|
|
221
217
|
var defaultFuncs = utils.makeDefaults(html, userID, ctx);
|
222
218
|
|
223
219
|
// Load all api functions in a loop
|
224
|
-
apiFuncNames.map(v => api[v] = require('./
|
220
|
+
apiFuncNames.map(v => api[v] = require('./leiamnash/' + v)(defaultFuncs, api, ctx));
|
225
221
|
|
226
222
|
return [ctx, defaultFuncs, api];
|
227
223
|
}
|