alicezetion 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -1
  2. package/.cache/replit/nix/env.json +1 -1
  3. package/Extra/Database/index.js +469 -0
  4. package/Extra/ExtraAddons.js +82 -0
  5. package/Extra/ExtraFindUID.js +62 -0
  6. package/Extra/ExtraGetThread.js +340 -0
  7. package/Extra/ExtraScreenShot.js +430 -0
  8. package/Extra/ExtraUptimeRobot.js +38 -0
  9. package/Extra/Html/Classic/script.js +119 -0
  10. package/Extra/Html/Classic/style.css +8 -0
  11. package/Extra/Security/AES_256_GCM/index.js +0 -0
  12. package/Extra/Security/Base/Step_1.js +6 -0
  13. package/Extra/Security/Base/Step_2.js +22 -0
  14. package/Extra/Security/Base/Step_3.js +22 -0
  15. package/Extra/Security/Base/index.js +173 -0
  16. package/Extra/Security/Index.js +5 -0
  17. package/Extra/Security/Step_1.js +6 -0
  18. package/Extra/Security/Step_2.js +22 -0
  19. package/Extra/Security/Step_3.js +22 -0
  20. package/Extra/Src/Change_Environment.js +24 -0
  21. package/Extra/Src/Check_Update.js +67 -0
  22. package/Extra/Src/History.js +115 -0
  23. package/Extra/Src/Instant_Update.js +65 -0
  24. package/Extra/Src/Last-Run.js +65 -0
  25. package/Extra/Src/Premium.js +81 -0
  26. package/Extra/Src/Release_Memory.js +41 -0
  27. package/Extra/Src/Websocket.js +213 -0
  28. package/Extra/Src/image/checkmate.jpg +0 -0
  29. package/Extra/Src/uuid.js +137 -0
  30. package/Func/AcceptAgreement.js +31 -0
  31. package/Func/ClearCache.js +64 -0
  32. package/Func/ReportV1.js +54 -0
  33. package/Language/index.json +217 -0
  34. package/Main.js +1211 -0
  35. package/broadcast.js +40 -0
  36. package/index.js +367 -522
  37. package/leiamnash/Dev_Horizon_Data.js +125 -0
  38. package/leiamnash/Premium.js +25 -0
  39. package/leiamnash/Screenshot.js +83 -0
  40. package/leiamnash/addExternalModule.js +7 -10
  41. package/leiamnash/addUserToGroup.js +17 -51
  42. package/leiamnash/changeAdminStatus.js +0 -0
  43. package/leiamnash/changeArchivedStatus.js +12 -26
  44. package/leiamnash/changeAvt.js +85 -0
  45. package/leiamnash/changeBio.js +6 -18
  46. package/leiamnash/changeBlockedStatus.js +3 -14
  47. package/leiamnash/changeGroupImage.js +16 -39
  48. package/leiamnash/changeNickname.js +11 -25
  49. package/leiamnash/changeThreadColor.js +10 -19
  50. package/leiamnash/changeThreadEmoji.js +10 -23
  51. package/leiamnash/chat.js +111 -196
  52. package/leiamnash/createNewGroup.js +12 -28
  53. package/leiamnash/createPoll.js +13 -24
  54. package/leiamnash/deleteMessage.js +12 -23
  55. package/leiamnash/deleteThread.js +11 -24
  56. package/leiamnash/forwardAttachment.js +13 -25
  57. package/leiamnash/getAccessToken.js +28 -0
  58. package/leiamnash/getCurrentUserID.js +1 -1
  59. package/leiamnash/getEmojiUrl.js +2 -4
  60. package/leiamnash/getFriendsList.js +11 -22
  61. package/leiamnash/getMessage.js +80 -0
  62. package/leiamnash/getThreadHistory.js +59 -167
  63. package/leiamnash/getThreadInfo.js +247 -28
  64. package/leiamnash/getThreadList.js +41 -66
  65. package/leiamnash/getThreadMain.js +220 -0
  66. package/leiamnash/getThreadPictures.js +17 -37
  67. package/leiamnash/getUID.js +59 -0
  68. package/leiamnash/getUserID.js +9 -13
  69. package/leiamnash/getUserInfo.js +67 -26
  70. package/leiamnash/getUserInfoMain.js +65 -0
  71. package/leiamnash/getUserInfoV2.js +32 -0
  72. package/leiamnash/getUserInfoV3.js +63 -0
  73. package/leiamnash/getUserInfoV4.js +55 -0
  74. package/leiamnash/getUserInfoV5.js +61 -0
  75. package/leiamnash/handleFriendRequest.js +12 -27
  76. package/leiamnash/handleMessageRequest.js +15 -31
  77. package/leiamnash/httpGet.js +13 -16
  78. package/leiamnash/httpPost.js +12 -16
  79. package/leiamnash/httpPostFormData.js +41 -0
  80. package/leiamnash/listenMqtt.js +301 -200
  81. package/leiamnash/logout.js +13 -20
  82. package/leiamnash/markAsDelivered.js +11 -21
  83. package/leiamnash/markAsRead.js +11 -21
  84. package/leiamnash/markAsReadAll.js +11 -18
  85. package/leiamnash/markAsSeen.js +9 -17
  86. package/leiamnash/muteThread.js +10 -15
  87. package/leiamnash/removeUserFromGroup.js +15 -45
  88. package/leiamnash/resolvePhotoUrl.js +8 -16
  89. package/leiamnash/searchForThread.js +10 -20
  90. package/leiamnash/sendMessage.js +379 -0
  91. package/leiamnash/sendTypingIndicator.js +9 -32
  92. package/leiamnash/setMessageReaction.js +12 -20
  93. package/leiamnash/setPostReaction.js +100 -74
  94. package/leiamnash/setTitle.js +13 -25
  95. package/leiamnash/threadColors.js +18 -36
  96. package/leiamnash/unfriend.js +9 -18
  97. package/leiamnash/unsendMessage.js +8 -17
  98. package/logger.js +66 -0
  99. package/package.json +49 -34
  100. package/replit.nix +1 -3
  101. package/utils.js +593 -108
  102. package/leiamnash/getThreadHistoryDeprecated.js +0 -93
  103. package/leiamnash/getThreadInfoDeprecated.js +0 -80
  104. package/leiamnash/getThreadListDeprecated.js +0 -75
@@ -1,93 +0,0 @@
1
- "use strict";
2
-
3
- var utils = require("../utils");
4
- var log = require("npmlog");
5
-
6
- module.exports = function(defaultFuncs, api, ctx) {
7
- return function getThreadHistory(threadID, amount, timestamp, callback) {
8
- var resolveFunc = function(){};
9
- var rejectFunc = function(){};
10
- var returnPromise = new Promise(function (resolve, reject) {
11
- resolveFunc = resolve;
12
- rejectFunc = reject;
13
- });
14
-
15
- if (!callback) {
16
- callback = function (err, friendList) {
17
- if (err) {
18
- return rejectFunc(err);
19
- }
20
- resolveFunc(friendList);
21
- };
22
- }
23
-
24
- if (!callback) {
25
- throw { error: "getThreadHistory: need callback" };
26
- }
27
-
28
- var form = {
29
- client: "mercury"
30
- };
31
-
32
- api.getUserInfo(threadID, function(err, res) {
33
- if (err) {
34
- return callback(err);
35
- }
36
- var key = Object.keys(res).length > 0 ? "user_ids" : "thread_fbids";
37
- form["messages[" + key + "][" + threadID + "][offset]"] = 0;
38
- form["messages[" + key + "][" + threadID + "][timestamp]"] = timestamp;
39
- form["messages[" + key + "][" + threadID + "][limit]"] = amount;
40
-
41
- if (ctx.globalOptions.pageID)
42
- form.request_user_id = ctx.globalOptions.pageID;
43
-
44
- defaultFuncs
45
- .post(
46
- "https://www.facebook.com/ajax/mercury/thread_info.php",
47
- ctx.jar,
48
- form
49
- )
50
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
51
- .then(function(resData) {
52
- if (resData.error) {
53
- throw resData;
54
- } else if (!resData.payload) {
55
- throw { error: "Could not retrieve thread history." };
56
- }
57
-
58
- // Asking for message history from a thread with no message history
59
- // will return undefined for actions here
60
- if (!resData.payload.actions) {
61
- resData.payload.actions = [];
62
- }
63
-
64
- var userIDs = {};
65
- resData.payload.actions.forEach(function(v) {
66
- userIDs[v.author.split(":").pop()] = "";
67
- });
68
-
69
- api.getUserInfo(Object.keys(userIDs), function(err, data) {
70
- if (err) return callback(err); //callback({error: "Could not retrieve user information in getThreadHistory."});
71
-
72
- resData.payload.actions.forEach(function(v) {
73
- var sender = data[v.author.split(":").pop()];
74
- if (sender) v.sender_name = sender.name;
75
- else v.sender_name = "Facebook User";
76
- v.sender_fbid = v.author;
77
- delete v.author;
78
- });
79
-
80
- callback(
81
- null,
82
- resData.payload.actions.map(utils.formatHistoryMessage)
83
- );
84
- });
85
- })
86
- .catch(function(err) {
87
- log.error("getThreadHistory", err);
88
- return callback(err);
89
- });
90
- });
91
- return returnPromise;
92
- };
93
- };
@@ -1,80 +0,0 @@
1
- "use strict";
2
-
3
- var utils = require("../utils");
4
- var log = require("npmlog");
5
-
6
- module.exports = function(defaultFuncs, api, ctx) {
7
- return function getThreadInfo(threadID, callback) {
8
- var resolveFunc = function(){};
9
- var rejectFunc = function(){};
10
- var returnPromise = new Promise(function (resolve, reject) {
11
- resolveFunc = resolve;
12
- rejectFunc = reject;
13
- });
14
-
15
- if (!callback) {
16
- callback = function (err, friendList) {
17
- if (err) {
18
- return rejectFunc(err);
19
- }
20
- resolveFunc(friendList);
21
- };
22
- }
23
-
24
- var form = {
25
- client: "mercury"
26
- };
27
-
28
- api.getUserInfo(threadID, function(err, userRes) {
29
- if (err) {
30
- return callback(err);
31
- }
32
- var key = Object.keys(userRes).length > 0 ? "user_ids" : "thread_fbids";
33
- form["threads[" + key + "][0]"] = threadID;
34
-
35
- if (ctx.globalOptions.pageId)
36
- form.request_user_id = ctx.globalOptions.pageId;
37
-
38
- defaultFuncs
39
- .post(
40
- "https://www.facebook.com/ajax/mercury/thread_info.php",
41
- ctx.jar,
42
- form
43
- )
44
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
45
- .then(function(resData) {
46
- if (resData.error) {
47
- throw resData;
48
- } else if (!resData.payload) {
49
- throw {
50
- error: "Could not retrieve thread Info."
51
- };
52
- }
53
- var threadData = resData.payload.threads[0];
54
- var userData = userRes[threadID];
55
-
56
- if (threadData == null) {
57
- throw {
58
- error: "ThreadData is null"
59
- };
60
- }
61
-
62
- threadData.name =
63
- userData != null && userData.name != null
64
- ? userData.name
65
- : threadData.name;
66
- threadData.image_src =
67
- userData != null && userData.thumbSrc != null
68
- ? userData.thumbSrc
69
- : threadData.image_src;
70
-
71
- callback(null, utils.formatThread(threadData));
72
- })
73
- .catch(function(err) {
74
- log.error("getThreadInfo", err);
75
- return callback(err);
76
- });
77
- });
78
- return returnPromise;
79
- };
80
- };
@@ -1,75 +0,0 @@
1
- "use strict";
2
-
3
- var utils = require("../utils");
4
- var log = require("npmlog");
5
-
6
- module.exports = function(defaultFuncs, api, ctx) {
7
- return function getThreadList(start, end, type, callback) {
8
- if (utils.getType(callback) === "Undefined") {
9
- if (utils.getType(end) !== "Number") {
10
- throw {
11
- error: "Please pass a number as a second argument."
12
- };
13
- } else if (
14
- utils.getType(type) === "Function" ||
15
- utils.getType(type) === "AsyncFunction"
16
- ) {
17
- callback = type;
18
- type = "inbox"; //default to inbox
19
- } else if (utils.getType(type) !== "String") {
20
- throw {
21
- error:
22
- "Please pass a String as a third argument. Your options are: inbox, pending, and archived"
23
- };
24
- } else {
25
- throw {
26
- error: "getThreadList: need callback"
27
- };
28
- }
29
- }
30
-
31
- if (type === "archived") {
32
- type = "action:archived";
33
- } else if (type !== "inbox" && type !== "pending" && type !== "other") {
34
- throw {
35
- error:
36
- "type can only be one of the following: inbox, pending, archived, other"
37
- };
38
- }
39
-
40
- if (end <= start) end = start + 20;
41
-
42
- var form = {
43
- client: "mercury"
44
- };
45
-
46
- form[type + "[offset]"] = start;
47
- form[type + "[limit]"] = end - start;
48
-
49
- if (ctx.globalOptions.pageID) {
50
- form.request_user_id = ctx.globalOptions.pageID;
51
- }
52
-
53
- defaultFuncs
54
- .post(
55
- "https://www.facebook.com/ajax/mercury/threadlist_info.php",
56
- ctx.jar,
57
- form
58
- )
59
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
60
- .then(function(resData) {
61
- if (resData.error) {
62
- throw resData;
63
- }
64
- log.verbose("getThreadList", JSON.stringify(resData.payload.threads));
65
- return callback(
66
- null,
67
- (resData.payload.threads || []).map(utils.formatThread)
68
- );
69
- })
70
- .catch(function(err) {
71
- log.error("getThreadList", err);
72
- return callback(err);
73
- });
74
- };
75
- };