alicezetion 1.5.6 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) 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 +489 -526
  4. package/leiamnash/addExternalModule.js +15 -19
  5. package/leiamnash/addUserToGroup.js +77 -113
  6. package/leiamnash/changeAdminStatus.js +47 -79
  7. package/leiamnash/changeArchivedStatus.js +41 -55
  8. package/leiamnash/changeBio.js +64 -77
  9. package/leiamnash/changeBlockedStatus.js +36 -47
  10. package/leiamnash/changeGroupImage.js +105 -129
  11. package/leiamnash/changeNickname.js +43 -59
  12. package/leiamnash/changeThreadColor.js +61 -71
  13. package/leiamnash/changeThreadEmoji.js +41 -55
  14. package/leiamnash/chat.js +324 -459
  15. package/leiamnash/createNewGroup.js +70 -86
  16. package/leiamnash/createPoll.js +59 -71
  17. package/leiamnash/deleteMessage.js +44 -56
  18. package/leiamnash/deleteThread.js +42 -56
  19. package/leiamnash/forwardAttachment.js +47 -60
  20. package/leiamnash/forwardMessage.js +0 -0
  21. package/leiamnash/getCurrentUserID.js +7 -7
  22. package/leiamnash/getEmojiUrl.js +27 -29
  23. package/leiamnash/getFriendsList.js +73 -84
  24. package/leiamnash/getThreadHistory.js +537 -645
  25. package/leiamnash/getThreadHistoryDeprecated.js +71 -93
  26. package/leiamnash/getThreadInfo.js +171 -206
  27. package/leiamnash/getThreadInfoDeprecated.js +56 -80
  28. package/leiamnash/getThreadList.js +213 -238
  29. package/leiamnash/getThreadListDeprecated.js +46 -75
  30. package/leiamnash/getThreadPictures.js +59 -79
  31. package/leiamnash/getUserID.js +61 -66
  32. package/leiamnash/getUserInfo.js +66 -72
  33. package/leiamnash/handleFriendRequest.js +46 -61
  34. package/leiamnash/handleMessageRequest.js +47 -65
  35. package/leiamnash/httpGet.js +47 -52
  36. package/leiamnash/httpPost.js +47 -52
  37. package/leiamnash/listen.js +553 -0
  38. package/leiamnash/listenMqtt-Test.js +687 -0
  39. package/leiamnash/listenMqtt.js +685 -789
  40. package/leiamnash/logout.js +68 -75
  41. package/leiamnash/markAsDelivered.js +47 -58
  42. package/leiamnash/markAsRead.js +70 -80
  43. package/leiamnash/markAsReadAll.js +39 -49
  44. package/leiamnash/markAsSeen.js +48 -59
  45. package/leiamnash/muteThread.js +45 -52
  46. package/leiamnash/removeUserFromGroup.js +45 -79
  47. package/leiamnash/resolvePhotoUrl.js +36 -45
  48. package/leiamnash/searchForThread.js +42 -53
  49. package/leiamnash/sendTypingIndicator.js +70 -103
  50. package/leiamnash/setMessageReaction.js +103 -117
  51. package/leiamnash/setPostReaction.js +63 -76
  52. package/leiamnash/setTitle.js +70 -86
  53. package/leiamnash/threadColors.js +41 -57
  54. package/leiamnash/unfriend.js +42 -52
  55. package/leiamnash/unsendMessage.js +39 -49
  56. package/package.json +73 -71
  57. package/utils.js +1198 -1356
@@ -1,52 +1,42 @@
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 unfriend(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) return rejectFunc(err);
18
+ resolveFunc(friendList);
19
+ };
20
+ }
21
+
22
+ var form = {
23
+ uid: userID,
24
+ unref: "bd_friends_tab",
25
+ floc: "friends_tab",
26
+ "nctr[_mod]": "pagelet_timeline_app_collection_" + ctx.userID + ":2356318349:2"
27
+ };
28
+
29
+ defaultFuncs
30
+ .post("https://www.facebook.com/ajax/profile/removefriendconfirm.php", ctx.jar, form)
31
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
32
+ .then(function (resData) {
33
+ if (resData.error) throw resData;
34
+ return callback();
35
+ })
36
+ .catch(function (err) {
37
+ log.error("unfriend", err);
38
+ return callback(err);
39
+ });
40
+ return returnPromise;
41
+ };
42
+ };
@@ -1,49 +1,39 @@
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) return rejectFunc(err);
18
+ resolveFunc(friendList);
19
+ };
20
+ }
21
+
22
+ var form = {
23
+ message_id: messageID
24
+ };
25
+
26
+ defaultFuncs
27
+ .post("https://www.facebook.com/messaging/unsend_message/", ctx.jar, form)
28
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
29
+ .then(function (resData) {
30
+ if (resData.error) throw resData;
31
+ return callback();
32
+ })
33
+ .catch(function (err) {
34
+ log.error("unsendMessage", "» ParseAndCheckLogin got status code: 404. Bailing out of trying to parse response.");
35
+ return callback(err);
36
+ });
37
+ return returnPromise;
38
+ };
39
+ };
package/package.json CHANGED
@@ -1,72 +1,74 @@
1
- {
2
- "name": "alicezetion",
3
- "version": "1.5.6",
4
- "description": "",
5
- "scripts": {
6
- "lint": "./node_modules/.bin/eslint **.js",
7
- "prettier": "prettier utils.js src/* --write"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "https://leiamnash.vercel.app"
12
- },
13
- "keywords": [
14
- "leiamnash"
15
- ],
16
- "bugs": {
17
- "url": ""
18
- },
19
- "author": "LeiamNash",
20
- "license": "MIT",
21
- "dependencies": {
22
- "bluebird": "^2.11.0",
23
- "cheerio": "^0.22.0",
24
- "https-proxy-agent": "^4.0.0",
25
- "mqtt": "^3.0.0",
26
- "npmlog": "^1.2.0",
27
- "request": "^2.53.0",
28
- "websocket-stream": "^5.5.0"
29
- },
30
- "engines": {
31
- "node": ">=10.x"
32
- },
33
- "devDependencies": {
34
- "eslint": "^7.5.0",
35
- "mocha": "^7.0.1",
36
- "prettier": "^1.11.1"
37
- },
38
- "eslintConfig": {
39
- "env": {
40
- "es6": true,
41
- "es2017": true,
42
- "node": true
43
- },
44
- "extends": "eslint:recommended",
45
- "parserOptions": {
46
- "sourceType": "module"
47
- },
48
- "rules": {
49
- "linebreak-style": [
50
- "error",
51
- "unix"
52
- ],
53
- "semi": [
54
- "error",
55
- "always"
56
- ],
57
- "no-unused-vars": [
58
- 1,
59
- {
60
- "argsIgnorePattern": "^_",
61
- "varsIgnorePattern": "^_"
62
- }
63
- ],
64
- "no-empty": [
65
- "error",
66
- {
67
- "allowEmptyCatch": true
68
- }
69
- ]
70
- }
71
- }
1
+ {
2
+ "name": "alicezetion",
3
+ "version": "1.5.8",
4
+ "description": "",
5
+ "scripts": {
6
+ "test": "mocha",
7
+ "lint": "./node_modules/.bin/eslint **.js",
8
+ "prettier": "prettier utils.js src/* --write"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://leiamnash.vercel.app"
13
+ },
14
+ "keywords": [
15
+ "leiamnash",
16
+ "alice"
17
+ ],
18
+ "bugs": {
19
+ "url": ""
20
+ },
21
+ "author": "LeiamNash",
22
+ "license": "MIT",
23
+ "dependencies": {
24
+ "bluebird": "^2.11.0",
25
+ "cheerio": "^0.22.0",
26
+ "https-proxy-agent": "^4.0.0",
27
+ "mqtt": "^3.0.0",
28
+ "npmlog": "^1.2.0",
29
+ "request": "^2.53.0",
30
+ "websocket-stream": "^5.5.0"
31
+ },
32
+ "engines": {
33
+ "node": ">=10.x"
34
+ },
35
+ "devDependencies": {
36
+ "eslint": "^7.5.0",
37
+ "mocha": "^7.0.1",
38
+ "prettier": "^1.11.1"
39
+ },
40
+ "eslintConfig": {
41
+ "env": {
42
+ "es6": true,
43
+ "es2017": true,
44
+ "node": true
45
+ },
46
+ "extends": "eslint:recommended",
47
+ "parserOptions": {
48
+ "sourceType": "module"
49
+ },
50
+ "rules": {
51
+ "linebreak-style": [
52
+ "error",
53
+ "unix"
54
+ ],
55
+ "semi": [
56
+ "error",
57
+ "always"
58
+ ],
59
+ "no-unused-vars": [
60
+ 1,
61
+ {
62
+ "argsIgnorePattern": "^_",
63
+ "varsIgnorePattern": "^_"
64
+ }
65
+ ],
66
+ "no-empty": [
67
+ "error",
68
+ {
69
+ "allowEmptyCatch": true
70
+ }
71
+ ]
72
+ }
73
+ }
72
74
  }