alicezetion 1.1.0 → 1.1.2
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/index.js +556 -490
- package/leiamnash/addExternalModule.js +19 -0
- package/{src → leiamnash}/addUserToGroup.js +52 -16
- package/leiamnash/changeAdminStatus.js +79 -0
- package/leiamnash/changeArchivedStatus.js +55 -0
- package/{src → leiamnash}/changeBio.js +19 -6
- package/{src → leiamnash}/changeBlockedStatus.js +14 -3
- package/{src → leiamnash}/changeGroupImage.js +40 -16
- package/leiamnash/changeNickname.js +59 -0
- package/{src → leiamnash}/changeThreadColor.js +20 -10
- package/leiamnash/changeThreadEmoji.js +55 -0
- package/leiamnash/chat.js +459 -0
- package/{src → leiamnash}/createNewGroup.js +28 -12
- package/{src → leiamnash}/createPoll.js +25 -13
- package/leiamnash/deleteMessage.js +56 -0
- package/leiamnash/deleteThread.js +56 -0
- package/leiamnash/forwardAttachment.js +60 -0
- package/{src → leiamnash}/getCurrentUserID.js +1 -1
- package/{src → leiamnash}/getEmojiUrl.js +4 -2
- package/{src → leiamnash}/getFriendsList.js +21 -10
- package/{src → leiamnash}/getThreadHistory.js +166 -58
- package/{src → leiamnash}/getThreadHistoryDeprecated.js +42 -20
- package/{src → leiamnash}/getThreadInfo.js +60 -25
- package/leiamnash/getThreadInfoDeprecated.js +80 -0
- package/{src → leiamnash}/getThreadList.js +66 -41
- package/leiamnash/getThreadListDeprecated.js +75 -0
- package/leiamnash/getThreadPictures.js +79 -0
- package/{src → leiamnash}/getUserID.js +14 -9
- package/{src → leiamnash}/getUserInfo.js +1 -1
- package/leiamnash/handleFriendRequest.js +61 -0
- package/leiamnash/handleMessageRequest.js +65 -0
- package/{src → leiamnash}/httpGet.js +17 -12
- package/{src → leiamnash}/httpPost.js +17 -12
- package/leiamnash/listenMqtt.js +687 -0
- package/{src → leiamnash}/logout.js +20 -13
- package/{src → leiamnash}/markAsDelivered.js +22 -11
- package/{src → leiamnash}/markAsRead.js +21 -11
- package/{src → leiamnash}/markAsReadAll.js +20 -10
- package/{src → leiamnash}/markAsSeen.js +18 -7
- package/{src → leiamnash}/muteThread.js +18 -11
- package/leiamnash/removeUserFromGroup.js +79 -0
- package/{src → leiamnash}/resolvePhotoUrl.js +17 -8
- package/{src → leiamnash}/searchForThread.js +21 -10
- package/{src → leiamnash}/sendTypingIndicator.js +47 -14
- package/{src → leiamnash}/setMessageReaction.js +26 -12
- package/{src → leiamnash}/setPostReaction.js +26 -13
- package/{src → leiamnash}/setTitle.js +29 -13
- package/leiamnash/threadColors.js +57 -0
- package/{src → leiamnash}/unfriend.js +19 -9
- package/{src → leiamnash}/unsendMessage.js +19 -9
- package/package.json +9 -14
- package/replit.nix +0 -1
- package/utils.js +1193 -1023
- package/src/addExternalModule.js +0 -15
- package/src/changeAdminStatus.js +0 -47
- package/src/changeArchivedStatus.js +0 -41
- package/src/changeNickname.js +0 -43
- package/src/changeThreadEmoji.js +0 -41
- package/src/chat.js +0 -315
- package/src/deleteMessage.js +0 -44
- package/src/deleteThread.js +0 -42
- package/src/forwardAttachment.js +0 -47
- package/src/forwardMessage.js +0 -0
- package/src/getThreadInfoDeprecated.js +0 -56
- package/src/getThreadListDeprecated.js +0 -46
- package/src/getThreadPictures.js +0 -59
- package/src/handleFriendRequest.js +0 -46
- package/src/handleMessageRequest.js +0 -47
- package/src/listen.js +0 -553
- package/src/listenMqtt-Test.js +0 -687
- package/src/listenMqtt.js +0 -677
- package/src/removeUserFromGroup.js +0 -45
- package/src/threadColors.js +0 -41
@@ -1,45 +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 removeUserFromGroup(userID, threadID, callback) {
|
8
|
-
if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) throw { error: "please pass a threadID as a second argument." };
|
9
|
-
if (utils.getType(threadID) !== "Number" && utils.getType(threadID) !== "String") throw { error: "threadID should be of type Number or String and not " + utils.getType(threadID) + "." };
|
10
|
-
if (utils.getType(userID) !== "Number" && utils.getType(userID) !== "String") throw { error: "userID should be of type Number or String and not " + utils.getType(userID) + "." };
|
11
|
-
|
12
|
-
var resolveFunc = function () { };
|
13
|
-
var rejectFunc = function () { };
|
14
|
-
var returnPromise = new Promise(function (resolve, reject) {
|
15
|
-
resolveFunc = resolve;
|
16
|
-
rejectFunc = reject;
|
17
|
-
});
|
18
|
-
|
19
|
-
if (!callback) {
|
20
|
-
callback = function (err, data) {
|
21
|
-
if (err) return rejectFunc(err);
|
22
|
-
resolveFunc(data);
|
23
|
-
};
|
24
|
-
}
|
25
|
-
|
26
|
-
var form = {
|
27
|
-
uid: userID,
|
28
|
-
tid: threadID
|
29
|
-
};
|
30
|
-
|
31
|
-
defaultFuncs
|
32
|
-
.post("https://www.facebook.com/chat/remove_participants", ctx.jar, form)
|
33
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
34
|
-
.then(function (resData) {
|
35
|
-
if (!resData) throw { error: "Remove from group failed." };
|
36
|
-
if (resData.error) throw resData;
|
37
|
-
return callback();
|
38
|
-
})
|
39
|
-
.catch(function (err) {
|
40
|
-
log.error("removeUserFromGroup", "» Bailing out of trying to parse response");
|
41
|
-
return callback(err);
|
42
|
-
});
|
43
|
-
return returnPromise;
|
44
|
-
};
|
45
|
-
};
|
package/src/threadColors.js
DELETED
@@ -1,41 +0,0 @@
|
|
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
|
-
|
7
|
-
//#region This part is for backward compatibly
|
8
|
-
//trying to match the color one-by-one. kill me plz
|
9
|
-
MessengerBlue: "196241301102133", //DefaultBlue
|
10
|
-
Viking: "1928399724138152", //TealBlue
|
11
|
-
GoldenPoppy: "174636906462322", //Yellow
|
12
|
-
RadicalRed: "2129984390566328", //Red
|
13
|
-
Shocking: "2058653964378557", //LavenderPurple
|
14
|
-
FreeSpeechGreen: "2136751179887052", //Green
|
15
|
-
Pumpkin: "175615189761153", //Orange
|
16
|
-
LightCoral: "980963458735625", //CoralPink
|
17
|
-
MediumSlateBlue: "234137870477637", //BrightPurple
|
18
|
-
DeepSkyBlue: "2442142322678320", //AquaBlue
|
19
|
-
BrilliantRose: "169463077092846", //HotPink
|
20
|
-
//i've tried my best, everything else can't be mapped. (or is it?) -UIRI 2020
|
21
|
-
//#endregion
|
22
|
-
|
23
|
-
DefaultBlue: "196241301102133",
|
24
|
-
HotPink: "169463077092846",
|
25
|
-
AquaBlue: "2442142322678320",
|
26
|
-
BrightPurple: "234137870477637",
|
27
|
-
CoralPink: "980963458735625",
|
28
|
-
Orange: "175615189761153",
|
29
|
-
Green: "2136751179887052",
|
30
|
-
LavenderPurple: "2058653964378557",
|
31
|
-
Red: "2129984390566328",
|
32
|
-
Yellow: "174636906462322",
|
33
|
-
TealBlue: "1928399724138152",
|
34
|
-
Aqua: "417639218648241",
|
35
|
-
Mango: "930060997172551",
|
36
|
-
Berry: "164535220883264",
|
37
|
-
Citrus: "370940413392601",
|
38
|
-
Candy: "205488546921017",
|
39
|
-
//StarWars: "809305022860427" Removed.
|
40
|
-
};
|
41
|
-
};
|