alicezetion 1.0.9 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -1
  2. package/.cache/replit/nix/env.json +1 -1
  3. package/index.js +558 -490
  4. package/leiamnash/addExternalModule.js +19 -0
  5. package/{src → leiamnash}/addUserToGroup.js +52 -16
  6. package/leiamnash/changeAdminStatus.js +79 -0
  7. package/leiamnash/changeArchivedStatus.js +55 -0
  8. package/{src → leiamnash}/changeBio.js +19 -6
  9. package/{src → leiamnash}/changeBlockedStatus.js +14 -3
  10. package/{src → leiamnash}/changeGroupImage.js +40 -16
  11. package/leiamnash/changeNickname.js +59 -0
  12. package/{src → leiamnash}/changeThreadColor.js +20 -10
  13. package/leiamnash/changeThreadEmoji.js +55 -0
  14. package/leiamnash/chat.js +459 -0
  15. package/{src → leiamnash}/createNewGroup.js +28 -12
  16. package/{src → leiamnash}/createPoll.js +25 -13
  17. package/leiamnash/deleteMessage.js +56 -0
  18. package/leiamnash/deleteThread.js +56 -0
  19. package/leiamnash/forwardAttachment.js +60 -0
  20. package/{src → leiamnash}/getCurrentUserID.js +1 -1
  21. package/{src → leiamnash}/getEmojiUrl.js +4 -2
  22. package/{src → leiamnash}/getFriendsList.js +21 -10
  23. package/{src → leiamnash}/getThreadHistory.js +166 -58
  24. package/{src → leiamnash}/getThreadHistoryDeprecated.js +42 -20
  25. package/{src → leiamnash}/getThreadInfo.js +60 -25
  26. package/leiamnash/getThreadInfoDeprecated.js +80 -0
  27. package/{src → leiamnash}/getThreadList.js +66 -41
  28. package/leiamnash/getThreadListDeprecated.js +75 -0
  29. package/leiamnash/getThreadPictures.js +79 -0
  30. package/{src → leiamnash}/getUserID.js +14 -9
  31. package/{src → leiamnash}/getUserInfo.js +18 -12
  32. package/leiamnash/handleFriendRequest.js +61 -0
  33. package/leiamnash/handleMessageRequest.js +65 -0
  34. package/{src → leiamnash}/httpGet.js +17 -12
  35. package/{src → leiamnash}/httpPost.js +17 -12
  36. package/leiamnash/listenMqtt.js +687 -0
  37. package/{src → leiamnash}/logout.js +20 -13
  38. package/{src → leiamnash}/markAsDelivered.js +22 -11
  39. package/{src → leiamnash}/markAsRead.js +21 -11
  40. package/{src → leiamnash}/markAsReadAll.js +20 -10
  41. package/{src → leiamnash}/markAsSeen.js +18 -7
  42. package/{src → leiamnash}/muteThread.js +18 -11
  43. package/leiamnash/removeUserFromGroup.js +79 -0
  44. package/{src → leiamnash}/resolvePhotoUrl.js +17 -8
  45. package/{src → leiamnash}/searchForThread.js +21 -10
  46. package/{src → leiamnash}/sendTypingIndicator.js +47 -14
  47. package/{src → leiamnash}/setMessageReaction.js +26 -12
  48. package/{src → leiamnash}/setPostReaction.js +26 -13
  49. package/{src → leiamnash}/setTitle.js +29 -13
  50. package/leiamnash/threadColors.js +57 -0
  51. package/{src → leiamnash}/unfriend.js +19 -9
  52. package/{src → leiamnash}/unsendMessage.js +19 -9
  53. package/package.json +9 -14
  54. package/replit.nix +0 -1
  55. package/utils.js +1193 -1023
  56. package/src/addExternalModule.js +0 -15
  57. package/src/changeAdminStatus.js +0 -47
  58. package/src/changeArchivedStatus.js +0 -41
  59. package/src/changeNickname.js +0 -43
  60. package/src/changeThreadEmoji.js +0 -41
  61. package/src/chat.js +0 -315
  62. package/src/deleteMessage.js +0 -44
  63. package/src/deleteThread.js +0 -42
  64. package/src/forwardAttachment.js +0 -47
  65. package/src/forwardMessage.js +0 -0
  66. package/src/getThreadInfoDeprecated.js +0 -56
  67. package/src/getThreadListDeprecated.js +0 -46
  68. package/src/getThreadPictures.js +0 -59
  69. package/src/handleFriendRequest.js +0 -46
  70. package/src/handleMessageRequest.js +0 -47
  71. package/src/listen.js +0 -553
  72. package/src/listenMqtt-Test.js +0 -687
  73. package/src/listenMqtt.js +0 -677
  74. package/src/removeUserFromGroup.js +0 -45
  75. 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
- };
@@ -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
- };