alicezetion 1.5.2 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) 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 +601 -386
  4. package/leiamnash/addExternalModule.js +19 -16
  5. package/leiamnash/addUserToGroup.js +113 -79
  6. package/leiamnash/changeAdminStatus.js +79 -79
  7. package/leiamnash/changeArchivedStatus.js +55 -41
  8. package/leiamnash/changeBio.js +77 -65
  9. package/leiamnash/changeBlockedStatus.js +47 -36
  10. package/leiamnash/changeGroupImage.js +129 -106
  11. package/leiamnash/changeNickname.js +59 -45
  12. package/leiamnash/changeThreadColor.js +71 -62
  13. package/leiamnash/changeThreadEmoji.js +55 -42
  14. package/leiamnash/chat.js +459 -374
  15. package/leiamnash/createNewGroup.js +86 -70
  16. package/leiamnash/createPoll.js +71 -60
  17. package/leiamnash/deleteMessage.js +56 -45
  18. package/leiamnash/deleteThread.js +56 -43
  19. package/leiamnash/forwardAttachment.js +60 -48
  20. package/leiamnash/getCurrentUserID.js +7 -7
  21. package/leiamnash/getEmojiUrl.js +29 -27
  22. package/leiamnash/getFriendsList.js +84 -73
  23. package/leiamnash/getThreadHistory.js +645 -537
  24. package/leiamnash/getThreadHistoryDeprecated.js +93 -0
  25. package/leiamnash/getThreadInfo.js +206 -425
  26. package/leiamnash/getThreadInfoDeprecated.js +80 -0
  27. package/leiamnash/getThreadList.js +238 -213
  28. package/leiamnash/getThreadListDeprecated.js +75 -0
  29. package/leiamnash/getThreadPictures.js +79 -59
  30. package/leiamnash/getUserID.js +66 -62
  31. package/leiamnash/getUserInfo.js +72 -113
  32. package/leiamnash/handleFriendRequest.js +61 -46
  33. package/leiamnash/handleMessageRequest.js +65 -49
  34. package/leiamnash/httpGet.js +52 -49
  35. package/leiamnash/httpPost.js +52 -48
  36. package/leiamnash/listenMqtt.js +789 -787
  37. package/leiamnash/logout.js +75 -68
  38. package/leiamnash/markAsDelivered.js +58 -48
  39. package/leiamnash/markAsRead.js +80 -70
  40. package/leiamnash/markAsReadAll.js +49 -42
  41. package/leiamnash/markAsSeen.js +59 -51
  42. package/leiamnash/muteThread.js +52 -47
  43. package/leiamnash/removeUserFromGroup.js +79 -49
  44. package/leiamnash/resolvePhotoUrl.js +45 -37
  45. package/leiamnash/searchForThread.js +53 -43
  46. package/leiamnash/sendTypingIndicator.js +103 -80
  47. package/leiamnash/setMessageReaction.js +117 -109
  48. package/leiamnash/setPostReaction.js +76 -102
  49. package/leiamnash/setTitle.js +86 -74
  50. package/leiamnash/threadColors.js +57 -39
  51. package/leiamnash/unfriend.js +52 -43
  52. package/leiamnash/unsendMessage.js +49 -40
  53. package/package.json +71 -88
  54. package/utils.js +1356 -1684
  55. package/Extra/Database/index.js +0 -469
  56. package/Extra/ExtraAddons.js +0 -82
  57. package/Extra/ExtraFindUID.js +0 -62
  58. package/Extra/ExtraGetThread.js +0 -340
  59. package/Extra/ExtraScreenShot.js +0 -430
  60. package/Extra/ExtraUptimeRobot.js +0 -38
  61. package/Extra/Html/Classic/script.js +0 -119
  62. package/Extra/Html/Classic/style.css +0 -8
  63. package/Extra/Security/AES_256_GCM/index.js +0 -0
  64. package/Extra/Security/Base/Step_1.js +0 -6
  65. package/Extra/Security/Base/Step_2.js +0 -22
  66. package/Extra/Security/Base/Step_3.js +0 -22
  67. package/Extra/Security/Base/index.js +0 -174
  68. package/Extra/Security/Index.js +0 -5
  69. package/Extra/Security/Step_1.js +0 -6
  70. package/Extra/Security/Step_2.js +0 -22
  71. package/Extra/Security/Step_3.js +0 -22
  72. package/Extra/Src/Change_Environment.js +0 -24
  73. package/Extra/Src/Check_Update.js +0 -67
  74. package/Extra/Src/History.js +0 -115
  75. package/Extra/Src/Instant_Update.js +0 -65
  76. package/Extra/Src/Last-Run.js +0 -65
  77. package/Extra/Src/Premium.js +0 -81
  78. package/Extra/Src/Release_Memory.js +0 -41
  79. package/Extra/Src/Websocket.js +0 -213
  80. package/Extra/Src/image/checkmate.jpg +0 -0
  81. package/Extra/Src/uuid.js +0 -137
  82. package/Func/AcceptAgreement.js +0 -31
  83. package/Func/ClearCache.js +0 -64
  84. package/Func/ReportV1.js +0 -54
  85. package/Language/index.json +0 -217
  86. package/Main.js +0 -1273
  87. package/broadcast.js +0 -40
  88. package/leiamnash/Dev_Horizon_Data.js +0 -125
  89. package/leiamnash/Premium.js +0 -25
  90. package/leiamnash/Screenshot.js +0 -83
  91. package/leiamnash/changeAvt.js +0 -85
  92. package/leiamnash/getAccessToken.js +0 -28
  93. package/leiamnash/getMessage.js +0 -80
  94. package/leiamnash/getThreadMain.js +0 -220
  95. package/leiamnash/getUID.js +0 -59
  96. package/leiamnash/getUserInfoMain.js +0 -65
  97. package/leiamnash/getUserInfoV2.js +0 -32
  98. package/leiamnash/getUserInfoV3.js +0 -63
  99. package/leiamnash/getUserInfoV4.js +0 -55
  100. package/leiamnash/getUserInfoV5.js +0 -61
  101. package/leiamnash/httpPostFormData.js +0 -41
  102. package/leiamnash/sendMessage.js +0 -379
  103. package/logger.js +0 -66
@@ -1,70 +1,86 @@
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 createNewGroup(participantIDs, groupTitle, callback) {
8
- if (utils.getType(groupTitle) == "Function") {
9
- callback = groupTitle;
10
- groupTitle = null;
11
- }
12
-
13
- if (utils.getType(participantIDs) !== "Array") throw { error: "createNewGroup: participantIDs should be an array." };
14
-
15
- if (participantIDs.length < 2) throw { error: "createNewGroup: participantIDs should have at least 2 IDs." };
16
-
17
- var resolveFunc = function () { };
18
- var rejectFunc = function () { };
19
- var returnPromise = new Promise(function (resolve, reject) {
20
- resolveFunc = resolve;
21
- rejectFunc = reject;
22
- });
23
-
24
- if (!callback) {
25
- callback = function (err, threadID) {
26
- if (err) return rejectFunc(err);
27
- resolveFunc(threadID);
28
- };
29
- }
30
-
31
- var pids = [];
32
- for (var n in participantIDs) pids.push({ fbid: participantIDs[n] });
33
- pids.push({ fbid: ctx.userID });
34
-
35
- var form = {
36
- fb_api_caller_class: "RelayModern",
37
- fb_api_req_friendly_name: "MessengerGroupCreateMutation",
38
- av: ctx.userID,
39
- //This doc_id is valid as of January 11th, 2020
40
- doc_id: "577041672419534",
41
- variables: JSON.stringify({
42
- input: {
43
- entry_point: "jewel_new_group",
44
- actor_id: ctx.userID,
45
- participants: pids,
46
- client_mutation_id: Math.round(Math.random() * 1024).toString(),
47
- thread_settings: {
48
- name: groupTitle,
49
- joinable_mode: "PRIVATE",
50
- thread_image_fbid: null
51
- }
52
- }
53
- })
54
- };
55
-
56
- defaultFuncs
57
- .post("https://www.facebook.com/api/graphql/", ctx.jar, form)
58
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
59
- .then(function (resData) {
60
- if (resData.errors) throw resData;
61
- return callback(null, resData.data.messenger_group_thread_create.thread.thread_key.thread_fbid);
62
- })
63
- .catch(function (err) {
64
- log.error("createNewGroup", err);
65
- return callback(err);
66
- });
67
-
68
- return returnPromise;
69
- };
70
- };
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 createNewGroup(participantIDs, groupTitle, callback) {
8
+ if (utils.getType(groupTitle) == "Function") {
9
+ callback = groupTitle;
10
+ groupTitle = null;
11
+ }
12
+
13
+ if (utils.getType(participantIDs) !== "Array") {
14
+ throw { error: "createNewGroup: participantIDs should be an array." };
15
+ }
16
+
17
+ if (participantIDs.length < 2) {
18
+ throw { error: "createNewGroup: participantIDs should have at least 2 IDs." };
19
+ }
20
+
21
+ var resolveFunc = function(){};
22
+ var rejectFunc = function(){};
23
+ var returnPromise = new Promise(function (resolve, reject) {
24
+ resolveFunc = resolve;
25
+ rejectFunc = reject;
26
+ });
27
+
28
+ if (!callback) {
29
+ callback = function (err, threadID) {
30
+ if (err) {
31
+ return rejectFunc(err);
32
+ }
33
+ resolveFunc(threadID);
34
+ };
35
+ }
36
+
37
+ var pids = [];
38
+ for (var n in participantIDs) {
39
+ pids.push({
40
+ fbid: participantIDs[n]
41
+ });
42
+ }
43
+ pids.push({fbid: ctx.userID});
44
+
45
+ var form = {
46
+ fb_api_caller_class: "RelayModern",
47
+ fb_api_req_friendly_name: "MessengerGroupCreateMutation",
48
+ av: ctx.userID,
49
+ //This doc_id is valid as of January 11th, 2020
50
+ doc_id: "577041672419534",
51
+ variables: JSON.stringify({
52
+ input: {
53
+ entry_point: "jewel_new_group",
54
+ actor_id: ctx.userID,
55
+ participants: pids,
56
+ client_mutation_id: Math.round(Math.random() * 1024).toString(),
57
+ thread_settings: {
58
+ name: groupTitle,
59
+ joinable_mode: "PRIVATE",
60
+ thread_image_fbid: null
61
+ }
62
+ }
63
+ })
64
+ };
65
+
66
+ defaultFuncs
67
+ .post(
68
+ "https://www.facebook.com/api/graphql/",
69
+ ctx.jar,
70
+ form
71
+ )
72
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
73
+ .then(function(resData) {
74
+ if (resData.errors) {
75
+ throw resData;
76
+ }
77
+ return callback(null, resData.data.messenger_group_thread_create.thread.thread_key.thread_fbid);
78
+ })
79
+ .catch(function(err) {
80
+ log.error("createNewGroup", err);
81
+ return callback(err);
82
+ });
83
+
84
+ return returnPromise;
85
+ };
86
+ };
@@ -1,60 +1,71 @@
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 createPoll(title, threadID, options, 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
- if (utils.getType(options) == "Function") {
17
- callback = options;
18
- options = null;
19
- }
20
- else {
21
- callback = function (err) {
22
- if (err) return rejectFunc(err);
23
- resolveFunc();
24
- };
25
- }
26
- }
27
- if (!options) options = {}; // Initial poll options are optional
28
-
29
- var form = {
30
- target_id: threadID,
31
- question_text: title
32
- };
33
-
34
- // Set fields for options (and whether they are selected initially by the posting user)
35
- var ind = 0;
36
- for (var opt in options) {
37
- // eslint-disable-next-line no-prototype-builtins
38
- if (options.hasOwnProperty(opt)) {
39
- form["option_text_array[" + ind + "]"] = opt;
40
- form["option_is_selected_array[" + ind + "]"] = options[opt] ? "1" : "0";
41
- ind++;
42
- }
43
- }
44
-
45
- defaultFuncs
46
- .post("https://www.facebook.com/messaging/group_polling/create_poll/?dpr=1", ctx.jar, form)
47
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
48
- .then(function (resData) {
49
- if (resData.payload.status != "success") throw resData;
50
-
51
- return callback();
52
- })
53
- .catch(function (err) {
54
- log.error("createPoll", err);
55
- return callback(err);
56
- });
57
-
58
- return returnPromise;
59
- };
60
- };
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 createPoll(title, threadID, options, 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
+ if (utils.getType(options) == "Function") {
17
+ callback = options;
18
+ options = null;
19
+ } else {
20
+ callback = function(err) {
21
+ if (err) {
22
+ return rejectFunc(err);
23
+ }
24
+ resolveFunc();
25
+ };
26
+ }
27
+ }
28
+ if (!options) {
29
+ options = {}; // Initial poll options are optional
30
+ }
31
+
32
+ var form = {
33
+ target_id: threadID,
34
+ question_text: title
35
+ };
36
+
37
+ // Set fields for options (and whether they are selected initially by the posting user)
38
+ var ind = 0;
39
+ for (var opt in options) {
40
+ // eslint-disable-next-line no-prototype-builtins
41
+ if (options.hasOwnProperty(opt)) {
42
+ form["option_text_array[" + ind + "]"] = opt;
43
+ form["option_is_selected_array[" + ind + "]"] = options[opt]
44
+ ? "1"
45
+ : "0";
46
+ ind++;
47
+ }
48
+ }
49
+
50
+ defaultFuncs
51
+ .post(
52
+ "https://www.facebook.com/messaging/group_polling/create_poll/?dpr=1",
53
+ ctx.jar,
54
+ form
55
+ )
56
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
57
+ .then(function(resData) {
58
+ if (resData.payload.status != "success") {
59
+ throw resData;
60
+ }
61
+
62
+ return callback();
63
+ })
64
+ .catch(function(err) {
65
+ log.error("createPoll", err);
66
+ return callback(err);
67
+ });
68
+
69
+ return returnPromise;
70
+ };
71
+ };
@@ -1,45 +1,56 @@
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 deleteMessage(messageOrMessages, 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
- if (!callback) {
15
- callback = function (err) {
16
- if (err) return rejectFunc(err);
17
-
18
- resolveFunc();
19
- };
20
- }
21
-
22
- var form = {
23
- client: "mercury"
24
- };
25
-
26
- if (utils.getType(messageOrMessages) !== "Array") messageOrMessages = [messageOrMessages];
27
-
28
- for (var i = 0; i < messageOrMessages.length; i++) form["message_ids[" + i + "]"] = messageOrMessages[i];
29
-
30
- defaultFuncs
31
- .post("https://www.facebook.com/ajax/mercury/delete_messages.php", ctx.jar, form)
32
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
33
- .then(function (resData) {
34
- if (resData.error) throw resData;
35
-
36
- return callback();
37
- })
38
- .catch(function (err) {
39
- log.error("deleteMessage", err);
40
- return callback(err);
41
- });
42
-
43
- return returnPromise;
44
- };
45
- };
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 deleteMessage(messageOrMessages, 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
+ if (!callback) {
15
+ callback = function(err) {
16
+ if (err) {
17
+ return rejectFunc(err);
18
+ }
19
+ resolveFunc();
20
+ };
21
+ }
22
+
23
+ var form = {
24
+ client: "mercury"
25
+ };
26
+
27
+ if (utils.getType(messageOrMessages) !== "Array") {
28
+ messageOrMessages = [messageOrMessages];
29
+ }
30
+
31
+ for (var i = 0; i < messageOrMessages.length; i++) {
32
+ form["message_ids[" + i + "]"] = messageOrMessages[i];
33
+ }
34
+
35
+ defaultFuncs
36
+ .post(
37
+ "https://www.facebook.com/ajax/mercury/delete_messages.php",
38
+ ctx.jar,
39
+ form
40
+ )
41
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
42
+ .then(function(resData) {
43
+ if (resData.error) {
44
+ throw resData;
45
+ }
46
+
47
+ return callback();
48
+ })
49
+ .catch(function(err) {
50
+ log.error("deleteMessage", err);
51
+ return callback(err);
52
+ });
53
+
54
+ return returnPromise;
55
+ };
56
+ };
@@ -1,43 +1,56 @@
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 deleteThread(threadOrThreads, 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
- if (!callback) {
15
- callback = function (err) {
16
- if (err) return rejectFunc(err);
17
- resolveFunc();
18
- };
19
- }
20
-
21
- var form = {
22
- client: "mercury"
23
- };
24
-
25
- if (utils.getType(threadOrThreads) !== "Array") threadOrThreads = [threadOrThreads];
26
- for (var i = 0; i < threadOrThreads.length; i++) form["ids[" + i + "]"] = threadOrThreads[i];
27
-
28
- defaultFuncs
29
- .post("https://www.facebook.com/ajax/mercury/delete_thread.php", ctx.jar, form)
30
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
31
- .then(function (resData) {
32
- if (resData.error) throw resData;
33
-
34
- return callback();
35
- })
36
- .catch(function (err) {
37
- log.error("deleteThread", err);
38
- return callback(err);
39
- });
40
-
41
- return returnPromise;
42
- };
43
- };
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 deleteThread(threadOrThreads, 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
+ if (!callback) {
15
+ callback = function(err) {
16
+ if (err) {
17
+ return rejectFunc(err);
18
+ }
19
+ resolveFunc();
20
+ };
21
+ }
22
+
23
+ var form = {
24
+ client: "mercury"
25
+ };
26
+
27
+ if (utils.getType(threadOrThreads) !== "Array") {
28
+ threadOrThreads = [threadOrThreads];
29
+ }
30
+
31
+ for (var i = 0; i < threadOrThreads.length; i++) {
32
+ form["ids[" + i + "]"] = threadOrThreads[i];
33
+ }
34
+
35
+ defaultFuncs
36
+ .post(
37
+ "https://www.facebook.com/ajax/mercury/delete_thread.php",
38
+ ctx.jar,
39
+ form
40
+ )
41
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
42
+ .then(function(resData) {
43
+ if (resData.error) {
44
+ throw resData;
45
+ }
46
+
47
+ return callback();
48
+ })
49
+ .catch(function(err) {
50
+ log.error("deleteThread", err);
51
+ return callback(err);
52
+ });
53
+
54
+ return returnPromise;
55
+ };
56
+ };
@@ -1,48 +1,60 @@
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 forwardAttachment(attachmentID, userOrUsers, 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
- if (!callback) {
15
- callback = function (err) {
16
- if (err) return rejectFunc(err);
17
- resolveFunc();
18
- };
19
- }
20
-
21
- var form = {
22
- attachment_id: attachmentID
23
- };
24
-
25
- if (utils.getType(userOrUsers) !== "Array") userOrUsers = [userOrUsers];
26
-
27
- var timestamp = Math.floor(Date.now() / 1000);
28
-
29
- //That's good, the key of the array is really timestmap in seconds + index
30
- //Probably time when the attachment will be sent?
31
- for (var i = 0; i < userOrUsers.length; i++) form["recipient_map[" + (timestamp + i) + "]"] = userOrUsers[i];
32
-
33
- defaultFuncs
34
- .post("https://www.facebook.com/mercury/attachments/forward/", ctx.jar, form)
35
- .then(utils.parseAndCheckLogin(ctx.jar, defaultFuncs))
36
- .then(function (resData) {
37
- if (resData.error) throw resData;
38
-
39
- return callback();
40
- })
41
- .catch(function (err) {
42
- log.error("forwardAttachment", err);
43
- return callback(err);
44
- });
45
-
46
- return returnPromise;
47
- };
48
- };
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 forwardAttachment(attachmentID, userOrUsers, 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
+ if (!callback) {
15
+ callback = function(err) {
16
+ if (err) {
17
+ return rejectFunc(err);
18
+ }
19
+ resolveFunc();
20
+ };
21
+ }
22
+
23
+ var form = {
24
+ attachment_id: attachmentID
25
+ };
26
+
27
+ if (utils.getType(userOrUsers) !== "Array") {
28
+ userOrUsers = [userOrUsers];
29
+ }
30
+
31
+ var timestamp = Math.floor(Date.now() / 1000);
32
+
33
+ for (var i = 0; i < userOrUsers.length; i++) {
34
+ //That's good, the key of the array is really timestmap in seconds + index
35
+ //Probably time when the attachment will be sent?
36
+ form["recipient_map[" + (timestamp + i) + "]"] = userOrUsers[i];
37
+ }
38
+
39
+ defaultFuncs
40
+ .post(
41
+ "https://www.facebook.com/mercury/attachments/forward/",
42
+ ctx.jar,
43
+ form
44
+ )
45
+ .then(utils.parseAndCheckLogin(ctx.jar, defaultFuncs))
46
+ .then(function(resData) {
47
+ if (resData.error) {
48
+ throw resData;
49
+ }
50
+
51
+ return callback();
52
+ })
53
+ .catch(function(err) {
54
+ log.error("forwardAttachment", err);
55
+ return callback(err);
56
+ });
57
+
58
+ return returnPromise;
59
+ };
60
+ };
@@ -1,7 +1,7 @@
1
- "use strict";
2
-
3
- module.exports = function (defaultFuncs, api, ctx) {
4
- return function getCurrentUserID() {
5
- return ctx.userID;
6
- };
7
- };
1
+ "use strict";
2
+
3
+ module.exports = function(defaultFuncs, api, ctx) {
4
+ return function getCurrentUserID() {
5
+ return ctx.userID;
6
+ };
7
+ };