alicezetion 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/replit/__replit_disk_meta.json +1 -1
- package/.cache/replit/nix/env.json +1 -1
- package/Extra/Database/index.js +469 -0
- package/Extra/ExtraAddons.js +82 -0
- package/Extra/ExtraFindUID.js +62 -0
- package/Extra/ExtraGetThread.js +340 -0
- package/Extra/ExtraScreenShot.js +430 -0
- package/Extra/ExtraUptimeRobot.js +38 -0
- package/Extra/Html/Classic/script.js +119 -0
- package/Extra/Html/Classic/style.css +8 -0
- package/Extra/Security/AES_256_GCM/index.js +0 -0
- package/Extra/Security/Base/Step_1.js +6 -0
- package/Extra/Security/Base/Step_2.js +22 -0
- package/Extra/Security/Base/Step_3.js +22 -0
- package/Extra/Security/Base/index.js +173 -0
- package/Extra/Security/Index.js +5 -0
- package/Extra/Security/Step_1.js +6 -0
- package/Extra/Security/Step_2.js +22 -0
- package/Extra/Security/Step_3.js +22 -0
- package/Extra/Src/Change_Environment.js +24 -0
- package/Extra/Src/Check_Update.js +67 -0
- package/Extra/Src/History.js +115 -0
- package/Extra/Src/Instant_Update.js +65 -0
- package/Extra/Src/Last-Run.js +65 -0
- package/Extra/Src/Premium.js +81 -0
- package/Extra/Src/Release_Memory.js +41 -0
- package/Extra/Src/Websocket.js +213 -0
- package/Extra/Src/image/checkmate.jpg +0 -0
- package/Extra/Src/uuid.js +137 -0
- package/Func/AcceptAgreement.js +31 -0
- package/Func/ClearCache.js +64 -0
- package/Func/ReportV1.js +54 -0
- package/Language/index.json +217 -0
- package/Main.js +1211 -0
- package/broadcast.js +40 -0
- package/index.js +367 -522
- package/leiamnash/Dev_Horizon_Data.js +125 -0
- package/leiamnash/Premium.js +25 -0
- package/leiamnash/Screenshot.js +83 -0
- package/leiamnash/addExternalModule.js +7 -10
- package/leiamnash/addUserToGroup.js +17 -51
- package/leiamnash/changeAdminStatus.js +0 -0
- package/leiamnash/changeArchivedStatus.js +12 -26
- package/leiamnash/changeAvt.js +85 -0
- package/leiamnash/changeBio.js +6 -18
- package/leiamnash/changeBlockedStatus.js +3 -14
- package/leiamnash/changeGroupImage.js +16 -39
- package/leiamnash/changeNickname.js +11 -25
- package/leiamnash/changeThreadColor.js +10 -19
- package/leiamnash/changeThreadEmoji.js +10 -23
- package/leiamnash/chat.js +111 -196
- package/leiamnash/createNewGroup.js +12 -28
- package/leiamnash/createPoll.js +13 -24
- package/leiamnash/deleteMessage.js +12 -23
- package/leiamnash/deleteThread.js +11 -24
- package/leiamnash/forwardAttachment.js +13 -25
- package/leiamnash/getAccessToken.js +28 -0
- package/leiamnash/getCurrentUserID.js +1 -1
- package/leiamnash/getEmojiUrl.js +2 -4
- package/leiamnash/getFriendsList.js +11 -22
- package/leiamnash/getMessage.js +80 -0
- package/leiamnash/getThreadHistory.js +59 -167
- package/leiamnash/getThreadInfo.js +247 -28
- package/leiamnash/getThreadList.js +41 -66
- package/leiamnash/getThreadMain.js +220 -0
- package/leiamnash/getThreadPictures.js +17 -37
- package/leiamnash/getUID.js +59 -0
- package/leiamnash/getUserID.js +9 -13
- package/leiamnash/getUserInfo.js +67 -26
- package/leiamnash/getUserInfoMain.js +65 -0
- package/leiamnash/getUserInfoV2.js +32 -0
- package/leiamnash/getUserInfoV3.js +63 -0
- package/leiamnash/getUserInfoV4.js +55 -0
- package/leiamnash/getUserInfoV5.js +61 -0
- package/leiamnash/handleFriendRequest.js +12 -27
- package/leiamnash/handleMessageRequest.js +15 -31
- package/leiamnash/httpGet.js +13 -16
- package/leiamnash/httpPost.js +12 -16
- package/leiamnash/httpPostFormData.js +41 -0
- package/leiamnash/listenMqtt.js +301 -200
- package/leiamnash/logout.js +13 -20
- package/leiamnash/markAsDelivered.js +11 -21
- package/leiamnash/markAsRead.js +11 -21
- package/leiamnash/markAsReadAll.js +11 -18
- package/leiamnash/markAsSeen.js +9 -17
- package/leiamnash/muteThread.js +10 -15
- package/leiamnash/removeUserFromGroup.js +15 -45
- package/leiamnash/resolvePhotoUrl.js +8 -16
- package/leiamnash/searchForThread.js +10 -20
- package/leiamnash/sendMessage.js +379 -0
- package/leiamnash/sendTypingIndicator.js +9 -32
- package/leiamnash/setMessageReaction.js +12 -20
- package/leiamnash/setPostReaction.js +100 -74
- package/leiamnash/setTitle.js +13 -25
- package/leiamnash/threadColors.js +18 -36
- package/leiamnash/unfriend.js +9 -18
- package/leiamnash/unsendMessage.js +8 -17
- package/logger.js +66 -0
- package/package.json +49 -34
- package/replit.nix +1 -3
- package/utils.js +593 -108
- package/leiamnash/getThreadHistoryDeprecated.js +0 -93
- package/leiamnash/getThreadInfoDeprecated.js +0 -80
- 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
|
-
};
|