fca-shankar-bot 20.2.0 → 20.3.0

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.
Files changed (53) hide show
  1. package/.replit +14 -1
  2. package/Extra/Balancer.js +49 -0
  3. package/Extra/ExtraAddons.js +4 -4
  4. package/Extra/ExtraGetThread.js +27 -27
  5. package/Extra/ExtraScreenShot.js +3 -3
  6. package/Extra/ExtraUptimeRobot.js +4 -4
  7. package/Extra/Src/Change_Environment.js +2 -2
  8. package/Extra/Src/Check_Update.js +3 -3
  9. package/Extra/Src/Instant_Update.js +2 -2
  10. package/Extra/Src/Premium.js +7 -7
  11. package/Extra/Src/Release_Memory.js +7 -7
  12. package/Extra/Src/Websocket.js +12 -12
  13. package/Func/ClearCache.js +2 -2
  14. package/LICENSE +21 -0
  15. package/Language/index.json +22 -16
  16. package/Main.js +515 -349
  17. package/README.md +198 -0
  18. package/SECURITY.md +17 -0
  19. package/broadcast.js +44 -0
  20. package/index.js +215 -31
  21. package/logger.js +51 -122
  22. package/package.json +17 -15
  23. package/src/Dev_Horizon_Data.js +2 -2
  24. package/src/editMessage.js +45 -38
  25. package/src/listenMqtt.js +395 -373
  26. package/src/listenMqttV1.js +11 -11
  27. package/src/sendMessage.js +2 -2
  28. package/src/sendMqttMessage.js +51 -251
  29. package/src/setMessageReaction.js +64 -66
  30. package/src/shareContact.js +50 -75
  31. package/src/unsendMessage.js +32 -126
  32. package/src/unsendMqttMessage.js +66 -0
  33. package/test/data/shareAttach.js +146 -0
  34. package/test/data/something.mov +0 -0
  35. package/test/data/test.png +0 -0
  36. package/test/data/test.txt +7 -0
  37. package/test/example-config.json +18 -0
  38. package/test/test-page.js +140 -0
  39. package/test/test.js +385 -0
  40. package/test/testv2.js +3 -0
  41. package/utils.js +50 -11
  42. package/.cache/replit/env/latest +0 -49
  43. package/.cache/replit/env/latest.json +0 -1
  44. package/.cache/replit/modules/nodejs-20.res +0 -1
  45. package/.cache/replit/modules/replit.res +0 -1
  46. package/.cache/replit/modules.stamp +0 -0
  47. package/.cache/replit/toolchain.json +0 -1
  48. package/CountTime.json +0 -1
  49. package/src/followUser.js +0 -171
  50. package/src/getFacebookInfo.js +0 -69
  51. package/src/listenMqtt.jk +0 -732
  52. package/src/postStory.js +0 -122
  53. package/src/refreshFb_dtsg.js +0 -81
@@ -0,0 +1,140 @@
1
+ var login = require('../index.js');
2
+ var fs = require('fs');
3
+ var assert = require('assert');
4
+
5
+ var conf = JSON.parse(process.env.testconfig || fs.readFileSync('test/test-config.json', 'utf8'));
6
+ var credentials = {
7
+ email: conf.user.email,
8
+ password: conf.user.password,
9
+ };
10
+
11
+ var userIDs = conf.userIDs;
12
+
13
+ var options = {
14
+ selfListen: true,
15
+ listenEvents: true,
16
+ logLevel: "silent",
17
+ pageID: conf.pageID
18
+ };
19
+ var getType = require('../utils').getType;
20
+
21
+ var userID = conf.user.id;
22
+
23
+ var groupChatID;
24
+ var groupChatName;
25
+
26
+ function checkErr(done){
27
+ return function(err) {
28
+ if (err) done(err);
29
+ };
30
+ }
31
+
32
+ // describe('Login As Page:', function() {
33
+ // var api = null;
34
+ // process.on('SIGINT', () => api && !api.logout() && console.log("Logged out :)"));
35
+ // var tests = [];
36
+ // var stopListening;
37
+ // this.timeout(20000);
38
+
39
+ // function listen(done, matcher) {
40
+ // tests.push({matcher:matcher, done:done});
41
+ // }
42
+
43
+ // before(function(done) {
44
+ // login(credentials, options, function (err, localAPI) {
45
+ // if(err) return done(err);
46
+
47
+ // assert(localAPI);
48
+ // api = localAPI;
49
+ // stopListening = api.listen(function (err, msg) {
50
+ // if (err) throw err;
51
+ // // Removes matching function and calls corresponding done
52
+ // tests = tests.filter(function(test) {
53
+ // return !(test.matcher(msg) && (test.done() || true));
54
+ // });
55
+ // });
56
+
57
+ // done();
58
+ // });
59
+ // });
60
+
61
+ // it('should login without error', function (){
62
+ // assert(api);
63
+ // });
64
+
65
+ // it('should get the right user ID', function (){
66
+ // assert(userID == api.getCurrentUserID());
67
+ // });
68
+
69
+ // it('should send text message object (user)', function (done){
70
+ // var body = "text-msg-obj-" + Date.now();
71
+ // listen(done, msg =>
72
+ // msg.type === 'message' &&
73
+ // msg.body === body &&
74
+ // msg.isGroup === false
75
+ // );
76
+ // api.sendMessage({body: body}, userID, checkErr(done));
77
+ // });
78
+
79
+ // it('should send sticker message object (user)', function (done){
80
+ // var stickerID = '767334526626290';
81
+ // listen(done, msg =>
82
+ // msg.type === 'message' &&
83
+ // msg.attachments.length > 0 &&
84
+ // msg.attachments[0].type === 'sticker' &&
85
+ // msg.attachments[0].stickerID === stickerID &&
86
+ // msg.isGroup === false
87
+ // );
88
+ // api.sendMessage({sticker: stickerID}, userID, checkErr(done));
89
+ // });
90
+
91
+ // it('should send basic string (user)', function (done){
92
+ // var body = "basic-str-" + Date.now();
93
+ // listen(done, msg =>
94
+ // msg.type === 'message' &&
95
+ // msg.body === body &&
96
+ // msg.isGroup === false
97
+ // );
98
+ // api.sendMessage(body, userID, checkErr(done));
99
+ // });
100
+
101
+ // it('should send typing indicator', function (done) {
102
+ // var stopType = api.sendTypingIndicator(userID, function(err) {
103
+ // checkErr(done)(err);
104
+ // stopType();
105
+ // done();
106
+ // });
107
+ // });
108
+
109
+ // it('should get the right user info', function (done) {
110
+ // api.getUserInfo(userID, function(err, data) {
111
+ // checkErr(done)(err);
112
+ // var user = data[userID];
113
+ // assert(user.name);
114
+ // assert(user.firstName);
115
+ // assert(user.vanity !== null);
116
+ // assert(user.profileUrl);
117
+ // assert(user.gender);
118
+ // assert(user.type);
119
+ // assert(!user.isFriend);
120
+ // done();
121
+ // });
122
+ // });
123
+
124
+ // it('should get the list of friends', function (done) {
125
+ // api.getFriendsList(function(err, data) {
126
+ // checkErr(done)(err);
127
+ // assert(getType(data) === "Array");
128
+ // data.map(function(v) {parseInt(v);});
129
+ // done();
130
+ // });
131
+ // });
132
+
133
+ // it('should log out', function (done) {
134
+ // api.logout(done);
135
+ // });
136
+
137
+ // after(function (){
138
+ // if (stopListening) stopListening();
139
+ // });
140
+ // });
package/test/test.js ADDED
@@ -0,0 +1,385 @@
1
+ var login = require('../index.js');
2
+ var fs = require('fs');
3
+ var assert = require('assert');
4
+
5
+ var conf = JSON.parse(process.env.testconfig || fs.readFileSync('test/test-config.json', 'utf8'));
6
+ var credentials = {
7
+ email: conf.user.email,
8
+ password: conf.user.password,
9
+ };
10
+
11
+ var userIDs = conf.userIDs;
12
+
13
+ var options = { selfListen: true, listenEvents: true, logLevel: "silent"};
14
+ var pageOptions = {logLevel: 'silent', pageID: conf.pageID};
15
+ var getType = require('../utils').getType;
16
+ var formatDeltaMessage = require('../utils').formatDeltaMessage;
17
+ var shareAttachmentFixture = require('./data/shareAttach');
18
+
19
+ var userID = conf.user.id;
20
+
21
+ var groupChatID;
22
+ var groupChatName;
23
+
24
+ function checkErr(done){
25
+ return function(err) {
26
+ if (err) done(err);
27
+ };
28
+ }
29
+
30
+ describe('Login:', function() {
31
+ var api = null;
32
+ process.on('SIGINT', () => api && !api.logout() && console.log("Logged out :)"));
33
+ var tests = [];
34
+ var stopListening;
35
+ this.timeout(20000);
36
+
37
+ function listen(done, matcher) {
38
+ tests.push({matcher:matcher, done:done});
39
+ }
40
+
41
+ before(function(done) {
42
+ login(credentials, options, function (err, localAPI) {
43
+ if(err) return done(err);
44
+
45
+ assert(localAPI);
46
+ api = localAPI;
47
+ stopListening = api.listen(function (err, msg) {
48
+ if (err) throw err;
49
+ if (msg.type === "message") {
50
+ assert(msg.senderID && !isNaN(msg.senderID));
51
+ assert(msg.threadID && !isNaN(msg.threadID));
52
+ assert(msg.timestamp && !isNaN(msg.timestamp));
53
+ assert(msg.messageID != null && msg.messageID.length > 0);
54
+ assert(msg.body != null || msg.attachments.length > 0);
55
+ }
56
+ // Removes matching function and calls corresponding done
57
+ tests = tests.filter(function(test) {
58
+ return !(test.matcher(msg) && (test.done() || true));
59
+ });
60
+ });
61
+
62
+ done();
63
+ });
64
+ });
65
+
66
+ it('should login without error', function (){
67
+ assert(api);
68
+ });
69
+
70
+ it('should get the current user ID', function (){
71
+ assert(userID === api.getCurrentUserID());
72
+ });
73
+
74
+ it('should send text message object (user)', function (done){
75
+ var body = "text-msg-obj-" + Date.now();
76
+ listen(done, msg =>
77
+ msg.type === 'message' &&
78
+ msg.body === body &&
79
+ msg.isGroup === false
80
+ );
81
+ api.sendMessage({body: body}, userID, checkErr(done));
82
+ });
83
+
84
+ it('should send sticker message object (user)', function (done){
85
+ var stickerID = '767334526626290';
86
+ listen(done, msg =>
87
+ msg.type === 'message' &&
88
+ msg.attachments.length > 0 &&
89
+ msg.attachments[0].type === 'sticker' &&
90
+ msg.attachments[0].stickerID === stickerID &&
91
+ msg.isGroup === false
92
+ );
93
+ api.sendMessage({sticker: stickerID}, userID, checkErr(done));
94
+ });
95
+
96
+ it('should send basic string (user)', function (done){
97
+ var body = "basic-str-" + Date.now();
98
+ listen(done, msg =>
99
+ msg.type === 'message' &&
100
+ msg.body === body &&
101
+ msg.isGroup === false
102
+ );
103
+ api.sendMessage(body, userID, checkErr(done));
104
+ });
105
+
106
+ it('should get thread info (user)', function (done){
107
+ api.getThreadInfo(userID, (err, info) => {
108
+ if (err) done(err);
109
+
110
+ assert(info.participantIDs != null && info.participantIDs.length > 0);
111
+ assert(!info.participantIDs.some(isNaN));
112
+ assert(!info.participantIDs.some(v => v.length == 0));
113
+ assert(info.name != null);
114
+ assert(info.messageCount != null && !isNaN(info.messageCount));
115
+ assert(info.hasOwnProperty('emoji'));
116
+ assert(info.hasOwnProperty('nicknames'));
117
+ assert(info.hasOwnProperty('color'));
118
+ done();
119
+ });
120
+ });
121
+
122
+
123
+ it('should get the history of the chat (user)', function (done) {
124
+ api.getThreadHistory(userID, 5, null, function(err, data) {
125
+ checkErr(done)(err);
126
+ assert(getType(data) === "Array");
127
+ assert(data.every(function(v) {return getType(v) == "Object";}));
128
+ done();
129
+ });
130
+ });
131
+
132
+ it('should get the history of the chat (user) (graphql)', function (done) {
133
+ api.getThreadHistoryGraphQL(userID, 5, null, function(err, data) {
134
+ checkErr(done)(err);
135
+ assert(getType(data) === "Array");
136
+ assert(data.every(function(v) {return getType(v) == "Object";}));
137
+ done();
138
+ });
139
+ });
140
+
141
+ it('should create a chat', function (done){
142
+ var body = "new-chat-" + Date.now();
143
+ var inc = 0;
144
+
145
+ function doneHack(){
146
+ if (inc === 1) return done();
147
+ inc++;
148
+ }
149
+
150
+ listen(doneHack, msg =>
151
+ msg.type === 'message' && msg.body === body
152
+ );
153
+ api.sendMessage(body, userIDs, function(err, info){
154
+ checkErr(done)(err);
155
+ groupChatID = info.threadID;
156
+ doneHack();
157
+ });
158
+ });
159
+
160
+ it('should send text message object (group)', function (done){
161
+ var body = "text-msg-obj-" + Date.now();
162
+ listen(done, msg =>
163
+ msg.type === 'message' &&
164
+ msg.body === body &&
165
+ msg.isGroup === true
166
+ );
167
+ api.sendMessage({body: body}, groupChatID, function(err, info){
168
+ checkErr(done)(err);
169
+ assert(groupChatID === info.threadID);
170
+ });
171
+ });
172
+
173
+ it('should send basic string (group)', function (done){
174
+ var body = "basic-str-" + Date.now();
175
+ listen(done, msg =>
176
+ msg.type === 'message' &&
177
+ msg.body === body &&
178
+ msg.isGroup === true
179
+ );
180
+ api.sendMessage(body, groupChatID, function(err, info) {
181
+ checkErr(done)(err);
182
+ assert(groupChatID === info.threadID);
183
+ });
184
+ });
185
+
186
+ it('should send sticker message object (group)', function (done){
187
+ var stickerID = '767334526626290';
188
+ listen(done, function (msg) {
189
+ return msg.type === 'message' &&
190
+ msg.attachments.length > 0 &&
191
+ msg.attachments[0].type === 'sticker' &&
192
+ msg.attachments[0].stickerID === stickerID;
193
+ });
194
+ api.sendMessage({sticker: stickerID}, groupChatID, function (err, info) {
195
+ assert(groupChatID === info.threadID);
196
+ checkErr(done)(err);
197
+ });
198
+ });
199
+
200
+ it('should send an attachment with a body (group)', function (done){
201
+ var body = "attach-" + Date.now();
202
+ var attach = [];
203
+ attach.push(fs.createReadStream("test/data/test.txt"));
204
+ attach.push(fs.createReadStream("test/data/test.png"));
205
+ listen(done, function (msg) {
206
+ return msg.type === 'message' && msg.body === body;
207
+ });
208
+ api.sendMessage({attachment: attach, body: body}, groupChatID, function(err, info){
209
+ checkErr(done)(err);
210
+ assert(groupChatID === info.threadID);
211
+ });
212
+ });
213
+
214
+ it('should get the history of the chat (group)', function (done) {
215
+ api.getThreadHistory(groupChatID, 5, null, function(err, data) {
216
+ checkErr(done)(err);
217
+ assert(getType(data) === "Array");
218
+ assert(data.every(function(v) {return getType(v) == "Object";}));
219
+ done();
220
+ });
221
+ });
222
+
223
+ it('should get the history of the chat (group) (graphql)', function (done) {
224
+ api.getThreadHistoryGraphQL(groupChatID, 5, null, function(err, data) {
225
+ checkErr(done)(err);
226
+ assert(getType(data) === "Array");
227
+ assert(data.every(function(v) {return getType(v) == "Object";}));
228
+ done();
229
+ });
230
+ });
231
+
232
+
233
+ it('should change chat title', function (done){
234
+ var title = 'test-chat-title-' + Date.now();
235
+ listen(done, function (msg) {
236
+ return msg.type === 'event' &&
237
+ msg.logMessageType === 'log:thread-name' &&
238
+ msg.logMessageData.name === title;
239
+ });
240
+ groupChatName = title;
241
+ api.setTitle(title, groupChatID, checkErr(done));
242
+ });
243
+
244
+ it('should kick user', function (done) {
245
+ var id = userIDs[0];
246
+ listen(done, function (msg) {
247
+ return msg.type === 'event' &&
248
+ msg.logMessageType === 'log:unsubscribe' &&
249
+ msg.logMessageData.leftParticipantFbId === id;
250
+ });
251
+ api.removeUserFromGroup(id, groupChatID, checkErr(done));
252
+ });
253
+
254
+ it('should add user', function (done) {
255
+ var id = userIDs[0];
256
+ listen(done, function (msg) {
257
+ return (msg.type === 'event' &&
258
+ msg.logMessageType === 'log:subscribe' &&
259
+ msg.logMessageData.addedParticipants.length > 0 &&
260
+ msg.logMessageData.addedParticipants[0].userFbId === id);
261
+ });
262
+ // TODO: we don't check for errors inside this because FB changed and
263
+ // returns an error, even though we receive the event that the user was
264
+ // added
265
+ api.addUserToGroup(id, groupChatID, function() {});
266
+ });
267
+
268
+ xit('should get thread info (group)', function (done){
269
+ api.getThreadInfo(groupChatID, (err, info) => {
270
+ if (err) done(err);
271
+
272
+ assert(info.participantIDs != null && info.participantIDs.length > 0);
273
+ assert(!info.participantIDs.some(isNaN));
274
+ assert(!info.participantIDs.some(v => v.length == 0));
275
+ assert(info.name != null);
276
+ assert(info.messageCount != null && !isNaN(info.messageCount));
277
+ assert(info.hasOwnProperty('emoji'));
278
+ assert(info.hasOwnProperty('nicknames'));
279
+ assert(info.hasOwnProperty('color'));
280
+ done();
281
+ });
282
+ });
283
+
284
+ it('should retrieve a list of threads', function (done) {
285
+ api.getThreadList(0, 20, function(err, res) {
286
+ checkErr(done)(err);
287
+
288
+ // This checks to see if the group chat we just made
289
+ // is in the list... it should be.
290
+ assert(res.some(function (v) {
291
+ return (
292
+ v.threadID === groupChatID &&
293
+ userIDs.every(function (val) {
294
+ return v.participants.indexOf(val) > -1;
295
+ }) &&
296
+ v.name === groupChatName
297
+ );
298
+ }));
299
+ done();
300
+ });
301
+ });
302
+
303
+ it('should mark as read', function (done){
304
+ api.markAsRead(groupChatID, done);
305
+ });
306
+
307
+ it('should send typing indicator', function (done) {
308
+ var stopType = api.sendTypingIndicator(groupChatID, function(err) {
309
+ checkErr(done)(err);
310
+ stopType();
311
+ done();
312
+ });
313
+ });
314
+
315
+
316
+ it('should get the right user info', function (done) {
317
+ api.getUserInfo(userID, function(err, data) {
318
+ checkErr(done)(err);
319
+ var user = data[userID];
320
+ assert(user.name);
321
+ assert(user.firstName);
322
+ assert(user.vanity !== null);
323
+ assert(user.profileUrl);
324
+ assert(user.gender);
325
+ assert(user.type);
326
+ assert(!user.isFriend);
327
+ done();
328
+ });
329
+ });
330
+
331
+ it('should get the user ID', function(done) {
332
+ api.getUserInfo(userIDs[0], function(err, data) {
333
+ checkErr(done)(err);
334
+ var user = data[userIDs[0]];
335
+ api.getUserID(user.name, function(err, data) {
336
+ checkErr(done)(err);
337
+ assert(getType(data) === "Array");
338
+ assert(data.some(function(val) {
339
+ return val.userID === userIDs[0];
340
+ }));
341
+ done();
342
+ });
343
+ });
344
+ });
345
+
346
+ it('should get the list of friends', function (done) {
347
+ api.getFriendsList(function(err, data) {
348
+ try {
349
+ checkErr(done)(err);
350
+ assert(getType(data) === "Array");
351
+ data.map(v => {
352
+ assert(getType(v.firstName) === "String");
353
+ assert(getType(v.gender) === "String");
354
+ assert(getType(v.userID) === "String");
355
+ assert(getType(v.isFriend) === "Boolean");
356
+ assert(getType(v.fullName) === "String");
357
+ assert(getType(v.profilePicture) === "String");
358
+ assert(getType(v.type) === "String");
359
+ assert(v.hasOwnProperty("profileUrl")); // This can be null if the account is disabled
360
+ assert(getType(v.isBirthday) === "Boolean");
361
+ })
362
+ done();
363
+ } catch(e){
364
+ done(e);
365
+ }
366
+ });
367
+ });
368
+
369
+ it('should parse share attachment correctly', function () {
370
+ var formatted = formatDeltaMessage(shareAttachmentFixture);
371
+ assert(formatted.attachments[0].type === "share");
372
+ assert(formatted.attachments[0].title === "search engines");
373
+ assert(formatted.attachments[0].target.items[0].name === "search engines");
374
+ assert(formatted.attachments[0].target.items[0].call_to_actions.length === 3);
375
+ assert(formatted.attachments[0].target.items[0].call_to_actions[0].title === "Google");
376
+ });
377
+
378
+ it('should log out', function (done) {
379
+ api.logout(done);
380
+ });
381
+
382
+ after(function (){
383
+ if (stopListening) stopListening();
384
+ });
385
+ });
package/test/testv2.js ADDED
@@ -0,0 +1,3 @@
1
+ var languageFile = require('../Language/index.json');
2
+ var data = languageFile.find(i => i.Language == "vi");
3
+ console.log(data);
package/utils.js CHANGED
@@ -2405,13 +2405,41 @@ function formatRead(event) {
2405
2405
  function getFrom(str, startToken, endToken) {
2406
2406
  var start = str.indexOf(startToken) + startToken.length;
2407
2407
  if (start < startToken.length) return "";
2408
-
2409
2408
  var lastHalf = str.substring(start);
2410
2409
  var end = lastHalf.indexOf(endToken);
2411
- if (end === -1) throw Error("Could not find endTime `" + endToken + "` in the given string.");
2410
+ if (end === -1) throw Error("Could not find endTime " + endToken + " in the given string.");
2412
2411
  return lastHalf.substring(0, end);
2413
2412
  }
2414
2413
 
2414
+
2415
+ function getFroms(str, startToken, endToken) {
2416
+ //advanced search by kanzuuuuuuuuuu
2417
+ let results = [];
2418
+ let currentIndex = 0;
2419
+
2420
+ while (true) {
2421
+ let start = str.indexOf(startToken, currentIndex);
2422
+ if (start === -1) break;
2423
+
2424
+ start += startToken.length;
2425
+
2426
+ let lastHalf = str.substring(start);
2427
+ let end = lastHalf.indexOf(endToken);
2428
+
2429
+ if (end === -1) {
2430
+ if (results.length === 0) {
2431
+ throw Error("Could not find endToken `" + endToken + "` in the given string.");
2432
+ }
2433
+ break;
2434
+ }
2435
+
2436
+ results.push(lastHalf.substring(0, end));
2437
+ currentIndex = start + end + endToken.length;
2438
+ }
2439
+
2440
+ return results.length === 0 ? "" : results.length === 1 ? results[0] : results;
2441
+ }
2442
+
2415
2443
  /**
2416
2444
  * @param {string} html
2417
2445
  */
@@ -2659,12 +2687,17 @@ function parseAndCheckLogin(ctx, defaultFuncs, retryCount) {
2659
2687
  }
2660
2688
 
2661
2689
  if (res.error === 1357001) {
2662
- if (global.Fca.Require.ShankarConfig.AutoLogin && global.Fca.Require.ShankarConfig.CheckPointBypass['956'].Allow) {
2690
+ if (global.Fca.Require.Shankar.AutoLogin && global.Fca.Require.Shankar.CheckPointBypass['956'].Allow) {
2663
2691
  return global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.Bypass_956, async function() {
2664
2692
  const Check = () => new Promise((re) => {
2665
2693
  defaultFuncs.get('https://facebook.com', ctx.jar).then(function(res) {
2666
2694
  if (res.headers.location && res.headers.location.includes('https://www.facebook.com/checkpoint/')) {
2667
- if (res.headers.includes('828281030927956')) return global.Fca.Action('Bypass', ctx, "956", defaultFuncs)
2695
+ if (res.headers.location.includes('828281030927956')) return global.Fca.Action('Bypass', ctx, "956", defaultFuncs)
2696
+ else if (res.request.uri && res.request.uri.href.includes("https://www.facebook.com/checkpoint/")) {
2697
+ if (res.request.uri.href.includes('601051028565049')) {
2698
+ return global.Fca.BypassAutomationNotification(undefined, ctx.jar, ctx.globalOptions, undefined ,process.env.UID)
2699
+ }
2700
+ }
2668
2701
  else return global.Fca.Require.logger.Error(global.Fca.Require.Language.Index.ErrAppState);
2669
2702
  }
2670
2703
  else return global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.AutoLogin, function() {
@@ -2675,12 +2708,17 @@ function parseAndCheckLogin(ctx, defaultFuncs, retryCount) {
2675
2708
  await Check();
2676
2709
  });
2677
2710
  }
2678
- if (global.Fca.Require.ShankarConfig.AutoLogin) {
2711
+ if (res.request.uri && res.request.uri.href.includes("https://www.facebook.com/checkpoint/")) {
2712
+ if (res.request.uri.href.includes('601051028565049')) {
2713
+ return global.Fca.BypassAutomationNotification(undefined, ctx.jar, ctx.globalOptions, undefined ,process.env.UID)
2714
+ }
2715
+ }
2716
+ if (global.Fca.Require.Shankar.AutoLogin) {
2679
2717
  return global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.AutoLogin, function() {
2680
2718
  return global.Fca.Action('AutoLogin');
2681
2719
  });
2682
2720
  }
2683
- else if (!global.Fca.Require.ShankarConfig.AutoLogin) {
2721
+ else if (!global.Fca.Require.Shankar.AutoLogin) {
2684
2722
  return global.Fca.Require.logger.Error(global.Fca.Require.Language.Index.ErrAppState);
2685
2723
  }
2686
2724
  return;
@@ -2883,9 +2921,9 @@ function getAppState(jar, Encode) {
2883
2921
  var Security = require("./Extra/Security/Base");
2884
2922
  var appstate = jar.getCookies("https://www.facebook.com").concat(jar.getCookies("https://facebook.com")).concat(jar.getCookies("https://www.messenger.com"));
2885
2923
  var logger = require('./logger'),languageFile = require('./Language/index.json');
2886
- var Language = languageFile.find(i => i.Language == globalThis.Fca.Require.ShankarConfig.Language).Folder.Index;
2924
+ var Language = languageFile.find(i => i.Language == globalThis.Fca.Require.Shankar.Language).Folder.Index;
2887
2925
  var data;
2888
- switch (require(process.cwd() + "/ShankarConfig.json").EncryptFeature) {
2926
+ switch (require(process.cwd() + "/ShankarFca.json").EncryptFeature) {
2889
2927
  case true: {
2890
2928
  if (Encode == undefined) Encode = true;
2891
2929
  if (process.env['FBKEY'] != undefined && Encode) {
@@ -2900,7 +2938,7 @@ function getAppState(jar, Encode) {
2900
2938
  }
2901
2939
  break;
2902
2940
  default: {
2903
- logger.Normal(getText(Language.IsNotABoolean,require(process.cwd() + "/ShankarConfig.json").EncryptFeature));
2941
+ logger.Normal(getText(Language.IsNotABoolean,require(process.cwd() + "/ShankarFca.json").EncryptFeature));
2904
2942
  data = appstate;
2905
2943
  }
2906
2944
  }
@@ -3034,5 +3072,6 @@ module.exports = {
3034
3072
  decodeClientPayload,
3035
3073
  getAppState,
3036
3074
  getAdminTextMessageType,
3037
- setProxy
3038
- };
3075
+ setProxy,
3076
+ getFroms
3077
+ };