alicezetion 1.0.1 → 1.0.3
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/alice/addExternalModule.js +19 -19
- package/alice/addUserToGroup.js +113 -113
- package/alice/changeAdminStatus.js +79 -79
- package/alice/changeArchivedStatus.js +55 -55
- package/alice/changeBio.js +77 -77
- package/alice/changeBlockedStatus.js +47 -47
- package/alice/changeGroupImage.js +129 -129
- package/alice/changeNickname.js +59 -59
- package/alice/changeThreadColor.js +71 -71
- package/alice/changeThreadEmoji.js +55 -55
- package/alice/{sendMessage.js → chat.js} +459 -459
- package/alice/createNewGroup.js +86 -86
- package/alice/createPoll.js +71 -71
- package/alice/deleteMessage.js +56 -56
- package/alice/deleteThread.js +56 -56
- package/alice/forwardAttachment.js +60 -60
- package/alice/getCurrentUserID.js +7 -7
- package/alice/getEmojiUrl.js +29 -29
- package/alice/getFriendsList.js +84 -84
- package/alice/getThreadHistory.js +645 -645
- package/alice/getThreadHistoryDeprecated.js +93 -93
- package/alice/getThreadInfo.js +206 -206
- package/alice/getThreadInfoDeprecated.js +80 -80
- package/alice/getThreadList.js +238 -238
- package/alice/getThreadListDeprecated.js +75 -75
- package/alice/getThreadPictures.js +79 -79
- package/alice/getUserID.js +66 -66
- package/alice/getUserInfo.js +72 -72
- package/alice/handleFriendRequest.js +61 -61
- package/alice/handleMessageRequest.js +65 -65
- package/alice/httpGet.js +52 -52
- package/alice/httpPost.js +52 -52
- package/alice/listenMqtt.js +789 -789
- package/alice/logout.js +75 -75
- package/alice/markAsDelivered.js +58 -58
- package/alice/markAsRead.js +80 -80
- package/alice/markAsSeen.js +59 -59
- package/alice/muteThread.js +52 -52
- package/alice/{setMessageReaction.js → react.js} +117 -117
- package/alice/removeUserFromGroup.js +79 -79
- package/alice/resolvePhotoUrl.js +45 -45
- package/alice/searchForThread.js +53 -53
- package/alice/{markAsReadAll.js → seen.js} +49 -49
- package/alice/sendTypingIndicator.js +103 -103
- package/alice/setPostReaction.js +76 -76
- package/alice/setTitle.js +86 -86
- package/alice/threadColors.js +57 -57
- package/alice/unfriend.js +52 -52
- package/alice/unsendMessage.js +49 -49
- package/index.js +604 -604
- package/package.json +74 -77
- package/test/data/shareAttach.js +146 -0
- package/test/data/something.mov +0 -0
- package/test/data/test.png +0 -0
- package/test/data/test.txt +7 -0
- package/test/example-config.json +18 -0
- package/test/test-page.js +140 -0
- package/test/test.js +385 -0
- package/utils.js +1357 -1359
- package/.cache/replit/modules.stamp +0 -0
- package/.travis.yml +0 -6
package/alice/threadColors.js
CHANGED
@@ -1,57 +1,57 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
module.exports = function(_defaultFuncs, _api, _ctx) {
|
4
|
-
// Currently the only colors that can be passed to api.changeThreadColor(); may change if Facebook adds more
|
5
|
-
return {
|
6
|
-
//Old hex colors.
|
7
|
-
////MessengerBlue: null,
|
8
|
-
////Viking: "#44bec7",
|
9
|
-
////GoldenPoppy: "#ffc300",
|
10
|
-
////RadicalRed: "#fa3c4c",
|
11
|
-
////Shocking: "#d696bb",
|
12
|
-
////PictonBlue: "#6699cc",
|
13
|
-
////FreeSpeechGreen: "#13cf13",
|
14
|
-
////Pumpkin: "#ff7e29",
|
15
|
-
////LightCoral: "#e68585",
|
16
|
-
////MediumSlateBlue: "#7646ff",
|
17
|
-
////DeepSkyBlue: "#20cef5",
|
18
|
-
////Fern: "#67b868",
|
19
|
-
////Cameo: "#d4a88c",
|
20
|
-
////BrilliantRose: "#ff5ca1",
|
21
|
-
////BilobaFlower: "#a695c7"
|
22
|
-
|
23
|
-
//#region This part is for backward compatibly
|
24
|
-
//trying to match the color one-by-one. kill me plz
|
25
|
-
MessengerBlue: "196241301102133", //DefaultBlue
|
26
|
-
Viking: "1928399724138152", //TealBlue
|
27
|
-
GoldenPoppy: "174636906462322", //Yellow
|
28
|
-
RadicalRed: "2129984390566328", //Red
|
29
|
-
Shocking: "2058653964378557", //LavenderPurple
|
30
|
-
FreeSpeechGreen: "2136751179887052", //Green
|
31
|
-
Pumpkin: "175615189761153", //Orange
|
32
|
-
LightCoral: "980963458735625", //CoralPink
|
33
|
-
MediumSlateBlue: "234137870477637", //BrightPurple
|
34
|
-
DeepSkyBlue: "2442142322678320", //AquaBlue
|
35
|
-
BrilliantRose: "169463077092846", //HotPink
|
36
|
-
//i've tried my best, everything else can't be mapped. (or is it?) -UIRI 2020
|
37
|
-
//#endregion
|
38
|
-
|
39
|
-
DefaultBlue: "196241301102133",
|
40
|
-
HotPink: "169463077092846",
|
41
|
-
AquaBlue: "2442142322678320",
|
42
|
-
BrightPurple: "234137870477637",
|
43
|
-
CoralPink: "980963458735625",
|
44
|
-
Orange: "175615189761153",
|
45
|
-
Green: "2136751179887052",
|
46
|
-
LavenderPurple: "2058653964378557",
|
47
|
-
Red: "2129984390566328",
|
48
|
-
Yellow: "174636906462322",
|
49
|
-
TealBlue: "1928399724138152",
|
50
|
-
Aqua: "417639218648241",
|
51
|
-
Mango: "930060997172551",
|
52
|
-
Berry: "164535220883264",
|
53
|
-
Citrus: "370940413392601",
|
54
|
-
Candy: "205488546921017",
|
55
|
-
//StarWars: "809305022860427" Removed.
|
56
|
-
};
|
57
|
-
};
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
module.exports = function(_defaultFuncs, _api, _ctx) {
|
4
|
+
// Currently the only colors that can be passed to api.changeThreadColor(); may change if Facebook adds more
|
5
|
+
return {
|
6
|
+
//Old hex colors.
|
7
|
+
////MessengerBlue: null,
|
8
|
+
////Viking: "#44bec7",
|
9
|
+
////GoldenPoppy: "#ffc300",
|
10
|
+
////RadicalRed: "#fa3c4c",
|
11
|
+
////Shocking: "#d696bb",
|
12
|
+
////PictonBlue: "#6699cc",
|
13
|
+
////FreeSpeechGreen: "#13cf13",
|
14
|
+
////Pumpkin: "#ff7e29",
|
15
|
+
////LightCoral: "#e68585",
|
16
|
+
////MediumSlateBlue: "#7646ff",
|
17
|
+
////DeepSkyBlue: "#20cef5",
|
18
|
+
////Fern: "#67b868",
|
19
|
+
////Cameo: "#d4a88c",
|
20
|
+
////BrilliantRose: "#ff5ca1",
|
21
|
+
////BilobaFlower: "#a695c7"
|
22
|
+
|
23
|
+
//#region This part is for backward compatibly
|
24
|
+
//trying to match the color one-by-one. kill me plz
|
25
|
+
MessengerBlue: "196241301102133", //DefaultBlue
|
26
|
+
Viking: "1928399724138152", //TealBlue
|
27
|
+
GoldenPoppy: "174636906462322", //Yellow
|
28
|
+
RadicalRed: "2129984390566328", //Red
|
29
|
+
Shocking: "2058653964378557", //LavenderPurple
|
30
|
+
FreeSpeechGreen: "2136751179887052", //Green
|
31
|
+
Pumpkin: "175615189761153", //Orange
|
32
|
+
LightCoral: "980963458735625", //CoralPink
|
33
|
+
MediumSlateBlue: "234137870477637", //BrightPurple
|
34
|
+
DeepSkyBlue: "2442142322678320", //AquaBlue
|
35
|
+
BrilliantRose: "169463077092846", //HotPink
|
36
|
+
//i've tried my best, everything else can't be mapped. (or is it?) -UIRI 2020
|
37
|
+
//#endregion
|
38
|
+
|
39
|
+
DefaultBlue: "196241301102133",
|
40
|
+
HotPink: "169463077092846",
|
41
|
+
AquaBlue: "2442142322678320",
|
42
|
+
BrightPurple: "234137870477637",
|
43
|
+
CoralPink: "980963458735625",
|
44
|
+
Orange: "175615189761153",
|
45
|
+
Green: "2136751179887052",
|
46
|
+
LavenderPurple: "2058653964378557",
|
47
|
+
Red: "2129984390566328",
|
48
|
+
Yellow: "174636906462322",
|
49
|
+
TealBlue: "1928399724138152",
|
50
|
+
Aqua: "417639218648241",
|
51
|
+
Mango: "930060997172551",
|
52
|
+
Berry: "164535220883264",
|
53
|
+
Citrus: "370940413392601",
|
54
|
+
Candy: "205488546921017",
|
55
|
+
//StarWars: "809305022860427" Removed.
|
56
|
+
};
|
57
|
+
};
|
package/alice/unfriend.js
CHANGED
@@ -1,52 +1,52 @@
|
|
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 unsendMessage(userID, 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
|
-
uid: userID,
|
26
|
-
unref: "bd_friends_tab",
|
27
|
-
floc: "friends_tab",
|
28
|
-
"nctr[_mod]": "pagelet_timeline_app_collection_" + ctx.userID + ":2356318349:2"
|
29
|
-
};
|
30
|
-
|
31
|
-
defaultFuncs
|
32
|
-
.post(
|
33
|
-
"https://www.facebook.com/ajax/profile/removefriendconfirm.php",
|
34
|
-
ctx.jar,
|
35
|
-
form
|
36
|
-
)
|
37
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
38
|
-
.then(function(resData) {
|
39
|
-
if (resData.error) {
|
40
|
-
throw resData;
|
41
|
-
}
|
42
|
-
|
43
|
-
return callback();
|
44
|
-
})
|
45
|
-
.catch(function(err) {
|
46
|
-
log.error("unfriend", err);
|
47
|
-
return callback(err);
|
48
|
-
});
|
49
|
-
|
50
|
-
return returnPromise;
|
51
|
-
};
|
52
|
-
};
|
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 unsendMessage(userID, 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
|
+
uid: userID,
|
26
|
+
unref: "bd_friends_tab",
|
27
|
+
floc: "friends_tab",
|
28
|
+
"nctr[_mod]": "pagelet_timeline_app_collection_" + ctx.userID + ":2356318349:2"
|
29
|
+
};
|
30
|
+
|
31
|
+
defaultFuncs
|
32
|
+
.post(
|
33
|
+
"https://www.facebook.com/ajax/profile/removefriendconfirm.php",
|
34
|
+
ctx.jar,
|
35
|
+
form
|
36
|
+
)
|
37
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
38
|
+
.then(function(resData) {
|
39
|
+
if (resData.error) {
|
40
|
+
throw resData;
|
41
|
+
}
|
42
|
+
|
43
|
+
return callback();
|
44
|
+
})
|
45
|
+
.catch(function(err) {
|
46
|
+
log.error("unfriend", err);
|
47
|
+
return callback(err);
|
48
|
+
});
|
49
|
+
|
50
|
+
return returnPromise;
|
51
|
+
};
|
52
|
+
};
|
package/alice/unsendMessage.js
CHANGED
@@ -1,49 +1,49 @@
|
|
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 unsendMessage(messageID, 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
|
-
message_id: messageID
|
26
|
-
};
|
27
|
-
|
28
|
-
defaultFuncs
|
29
|
-
.post(
|
30
|
-
"https://www.facebook.com/messaging/unsend_message/",
|
31
|
-
ctx.jar,
|
32
|
-
form
|
33
|
-
)
|
34
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
35
|
-
.then(function(resData) {
|
36
|
-
if (resData.error) {
|
37
|
-
throw resData;
|
38
|
-
}
|
39
|
-
|
40
|
-
return callback();
|
41
|
-
})
|
42
|
-
.catch(function(err) {
|
43
|
-
log.error("unsendMessage", err);
|
44
|
-
return callback(err);
|
45
|
-
});
|
46
|
-
|
47
|
-
return returnPromise;
|
48
|
-
};
|
49
|
-
};
|
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 unsendMessage(messageID, 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
|
+
message_id: messageID
|
26
|
+
};
|
27
|
+
|
28
|
+
defaultFuncs
|
29
|
+
.post(
|
30
|
+
"https://www.facebook.com/messaging/unsend_message/",
|
31
|
+
ctx.jar,
|
32
|
+
form
|
33
|
+
)
|
34
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
35
|
+
.then(function(resData) {
|
36
|
+
if (resData.error) {
|
37
|
+
throw resData;
|
38
|
+
}
|
39
|
+
|
40
|
+
return callback();
|
41
|
+
})
|
42
|
+
.catch(function(err) {
|
43
|
+
log.error("unsendMessage", err);
|
44
|
+
return callback(err);
|
45
|
+
});
|
46
|
+
|
47
|
+
return returnPromise;
|
48
|
+
};
|
49
|
+
};
|