rapido-fca 0.0.1 → 0.0.3

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 (79) hide show
  1. package/package.json +1 -1
  2. package/readme.md +39 -237
  3. package/src/addExternalModule.js +23 -19
  4. package/src/addUserToGroup.js +97 -99
  5. package/src/changeAdminStatus.js +62 -86
  6. package/src/changeArchivedStatus.js +49 -49
  7. package/src/changeAvatar.js +108 -118
  8. package/src/changeBio.js +64 -63
  9. package/src/changeBlockedStatus.js +38 -40
  10. package/src/changeGroupImage.js +126 -129
  11. package/src/changeNickname.js +49 -49
  12. package/src/changeThreadColor.js +53 -53
  13. package/src/changeThreadEmoji.js +45 -45
  14. package/src/createNewGroup.js +72 -74
  15. package/src/createPoll.js +59 -59
  16. package/src/deleteMessage.js +50 -50
  17. package/src/deleteThread.js +50 -50
  18. package/src/editMessage.js +49 -51
  19. package/src/forwardAttachment.js +54 -54
  20. package/src/getCurrentUserID.js +3 -3
  21. package/src/getEmojiUrl.js +17 -17
  22. package/src/getFriendsList.js +67 -67
  23. package/src/getMessage.js +767 -806
  24. package/src/getThreadHistory.js +642 -656
  25. package/src/getThreadInfo.js +1 -1
  26. package/src/getThreadList.js +227 -199
  27. package/src/getThreadPictures.js +71 -51
  28. package/src/getUserID.js +58 -53
  29. package/src/getUserInfo.js +60 -52
  30. package/src/handleFriendRequest.js +65 -41
  31. package/src/handleMessageRequest.js +60 -42
  32. package/src/httpGet.js +57 -49
  33. package/src/httpPost.js +57 -48
  34. package/src/httpPostFormData.js +63 -0
  35. package/src/listenMqtt.js +895 -827
  36. package/src/logout.js +61 -61
  37. package/src/markAsDelivered.js +53 -42
  38. package/src/markAsRead.js +69 -59
  39. package/src/markAsReadAll.js +42 -32
  40. package/src/markAsSeen.js +54 -43
  41. package/src/muteThread.js +47 -40
  42. package/src/refreshFb_dtsg.js +69 -77
  43. package/src/removeUserFromGroup.js +67 -67
  44. package/src/resolvePhotoUrl.js +34 -34
  45. package/src/searchForThread.js +43 -43
  46. package/src/sendMessage.js +228 -80
  47. package/src/sendTypingIndicator.js +88 -86
  48. package/src/setMessageReaction.js +109 -110
  49. package/src/setPostReaction.js +87 -90
  50. package/src/setTitle.js +72 -76
  51. package/src/threadColors.js +121 -121
  52. package/src/unfriend.js +43 -43
  53. package/src/unsendMessage.js +38 -34
  54. package/src/uploadAttachment.js +81 -79
  55. package/src/changeAvatarV2.js +0 -86
  56. package/src/changeAvt.js +0 -85
  57. package/src/changeBlockedStatusMqtt.js +0 -80
  58. package/src/changeCover.js +0 -72
  59. package/src/changeName.js +0 -79
  60. package/src/changeUsername.js +0 -59
  61. package/src/createCommentPost.js +0 -230
  62. package/src/createPost.js +0 -276
  63. package/src/editMessageOld.js +0 -67
  64. package/src/follow.js +0 -74
  65. package/src/getAccess.js +0 -112
  66. package/src/getAvatarUser.js +0 -78
  67. package/src/getRegion.js +0 -7
  68. package/src/getThreadHistoryDeprecated.js +0 -71
  69. package/src/getThreadInfoDeprecated.js +0 -56
  70. package/src/getThreadListDeprecated.js +0 -46
  71. package/src/getUID.js +0 -119
  72. package/src/searchStickers.js +0 -53
  73. package/src/sendMessageMqtt.js +0 -322
  74. package/src/sendTypingIndicatorV2.js +0 -28
  75. package/src/setMessageReactionMqtt.js +0 -62
  76. package/src/setStoryReaction.js +0 -64
  77. package/src/shareContact.js +0 -110
  78. package/src/shareLink.js +0 -59
  79. package/src/stopListenMqtt.js +0 -23
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var utils = require("../utils");
4
- var log = require("npmlog");
5
- var bluebird = require("bluebird");
3
+ const utils = require("../utils");
4
+ const log = require("npmlog");
6
5
 
7
- var allowedProperties = {
6
+ const allowedProperties = {
8
7
  attachment: true,
9
8
  url: true,
10
9
  sticker: true,
@@ -12,27 +11,65 @@ var allowedProperties = {
12
11
  emojiSize: true,
13
12
  body: true,
14
13
  mentions: true,
15
- location: true,
14
+ location: true
16
15
  };
17
16
 
17
+ function removeSpecialChar(inputString) { // remove char banned by facebook
18
+ if (typeof inputString !== "string")
19
+ return inputString;
20
+ // Convert string to Buffer
21
+ const buffer = Buffer.from(inputString, 'utf8');
22
+
23
+ // Filter buffer start with ef b8 8f
24
+ let filteredBuffer = Buffer.alloc(0);
25
+ for (let i = 0; i < buffer.length; i++) {
26
+ if (buffer[i] === 0xEF && buffer[i + 1] === 0xB8 && buffer[i + 2] === 0x8F) {
27
+ i += 2; // Skip 3 bytes of buffer starting with ef b8 8f
28
+ } else {
29
+ filteredBuffer = Buffer.concat([filteredBuffer, buffer.slice(i, i + 1)]);
30
+ }
31
+ }
32
+
33
+ // Convert filtered buffer to string
34
+ const convertedString = filteredBuffer.toString('utf8');
35
+
36
+ return convertedString;
37
+ }
38
+
18
39
  module.exports = function (defaultFuncs, api, ctx) {
19
40
  function uploadAttachment(attachments, callback) {
20
- var uploads = [];
41
+ const uploads = [];
21
42
 
22
43
  // create an array of promises
23
- for (var i = 0; i < attachments.length; i++) {
24
- if (!utils.isReadableStream(attachments[i])) throw { error: "Attachment should be a readable stream and not " + utils.getType(attachments[i]) + "." };
25
- var form = {
44
+ for (let i = 0; i < attachments.length; i++) {
45
+ if (!utils.isReadableStream(attachments[i])) {
46
+ throw {
47
+ error:
48
+ "Attachment should be a readable stream and not " +
49
+ utils.getType(attachments[i]) +
50
+ "."
51
+ };
52
+ }
53
+
54
+ const form = {
26
55
  upload_1024: attachments[i],
27
56
  voice_clip: "true"
28
57
  };
29
58
 
30
59
  uploads.push(
31
60
  defaultFuncs
32
- .postFormData("https://upload.facebook.com/ajax/mercury/upload.php", ctx.jar, form, {}, {})
61
+ .postFormData(
62
+ "https://upload.facebook.com/ajax/mercury/upload.php",
63
+ ctx.jar,
64
+ form,
65
+ {}
66
+ )
33
67
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
34
68
  .then(function (resData) {
35
- if (resData.error) throw resData;
69
+ if (resData.error) {
70
+ throw resData;
71
+ }
72
+
36
73
  // We have to return the data unformatted unless we want to change it
37
74
  // back in sendMessage.
38
75
  return resData.payload.metadata[0];
@@ -41,9 +78,11 @@ module.exports = function (defaultFuncs, api, ctx) {
41
78
  }
42
79
 
43
80
  // resolve all promises
44
- bluebird
81
+ Promise
45
82
  .all(uploads)
46
- .then(resData => callback(null, resData))
83
+ .then(function (resData) {
84
+ callback(null, resData);
85
+ })
47
86
  .catch(function (err) {
48
87
  log.error("uploadAttachment", err);
49
88
  return callback(err);
@@ -51,18 +90,28 @@ module.exports = function (defaultFuncs, api, ctx) {
51
90
  }
52
91
 
53
92
  function getUrl(url, callback) {
54
- var form = {
93
+ const form = {
55
94
  image_height: 960,
56
95
  image_width: 960,
57
96
  uri: url
58
97
  };
59
98
 
60
99
  defaultFuncs
61
- .post("https://www.facebook.com/message_share_attachment/fromURI/", ctx.jar, form)
100
+ .post(
101
+ "https://www.facebook.com/message_share_attachment/fromURI/",
102
+ ctx.jar,
103
+ form
104
+ )
62
105
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
63
106
  .then(function (resData) {
64
- if (resData.error) return callback(resData);
65
- if (!resData.payload) return callback({ error: "Invalid url" });
107
+ if (resData.error) {
108
+ return callback(resData);
109
+ }
110
+
111
+ if (!resData.payload) {
112
+ return callback({ error: "Invalid url" });
113
+ }
114
+
66
115
  callback(null, resData.payload.share_data.share_params);
67
116
  })
68
117
  .catch(function (err) {
@@ -78,41 +127,51 @@ module.exports = function (defaultFuncs, api, ctx) {
78
127
  // 2. User is sending a message to a specific user.
79
128
  // 3. No additional form params and the message goes to an existing group chat.
80
129
  if (utils.getType(threadID) === "Array") {
81
- for (var i = 0; i < threadID.length; i++) form["specific_to_list[" + i + "]"] = "fbid:" + threadID[i];
82
- form["specific_to_list[" + threadID.length + "]"] = "fbid:" + ctx.userID;
130
+ for (let i = 0; i < threadID.length; i++) {
131
+ form["specific_to_list[" + i + "]"] = "fbid:" + threadID[i];
132
+ }
133
+ form["specific_to_list[" + threadID.length + "]"] = "fbid:" + (ctx.i_userID || ctx.userID);
83
134
  form["client_thread_id"] = "root:" + messageAndOTID;
84
135
  log.info("sendMessage", "Sending message to multiple users: " + threadID);
85
- }
86
- else {
136
+ } else {
87
137
  // This means that threadID is the id of a user, and the chat
88
138
  // is a single person chat
89
139
  if (isSingleUser) {
90
140
  form["specific_to_list[0]"] = "fbid:" + threadID;
91
- form["specific_to_list[1]"] = "fbid:" + ctx.userID;
141
+ form["specific_to_list[1]"] = "fbid:" + (ctx.i_userID || ctx.userID);
92
142
  form["other_user_fbid"] = threadID;
143
+ } else {
144
+ form["thread_fbid"] = threadID;
93
145
  }
94
- else form["thread_fbid"] = threadID;
95
146
  }
96
147
 
97
148
  if (ctx.globalOptions.pageID) {
98
149
  form["author"] = "fbid:" + ctx.globalOptions.pageID;
99
150
  form["specific_to_list[1]"] = "fbid:" + ctx.globalOptions.pageID;
100
- form["creator_info[creatorID]"] = ctx.userID;
151
+ form["creator_info[creatorID]"] = ctx.i_userID || ctx.userID;
101
152
  form["creator_info[creatorType]"] = "direct_admin";
102
153
  form["creator_info[labelType]"] = "sent_message";
103
154
  form["creator_info[pageID]"] = ctx.globalOptions.pageID;
104
155
  form["request_user_id"] = ctx.globalOptions.pageID;
105
- form["creator_info[profileURI]"] = "https://www.facebook.com/profile.php?id=" + ctx.userID;
156
+ form["creator_info[profileURI]"] =
157
+ "https://www.facebook.com/profile.php?id=" + (ctx.i_userID || ctx.userID);
106
158
  }
107
159
 
108
160
  defaultFuncs
109
161
  .post("https://www.facebook.com/messaging/send/", ctx.jar, form)
110
162
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
111
163
  .then(function (resData) {
112
- if (!resData) return callback({ error: "Send message failed." });
164
+ if (!resData) {
165
+ return callback({ error: "Send message failed." });
166
+ }
167
+
113
168
  if (resData.error) {
114
169
  if (resData.error === 1545012) {
115
- log.warn("sendMessage", "Got error 1545012. This might mean that you're not part of the conversation " + threadID);
170
+ log.warn(
171
+ "sendMessage",
172
+ "Got error 1545012. This might mean that you're not part of the conversation " +
173
+ threadID
174
+ );
116
175
  }
117
176
  else {
118
177
  log.error("sendMessage", resData);
@@ -120,7 +179,7 @@ module.exports = function (defaultFuncs, api, ctx) {
120
179
  return callback(resData);
121
180
  }
122
181
 
123
- var messageInfo = resData.payload.actions.reduce(function (p, v) {
182
+ const messageInfo = resData.payload.actions.reduce(function (p, v) {
124
183
  return (
125
184
  {
126
185
  threadID: v.thread_fbid,
@@ -134,7 +193,9 @@ module.exports = function (defaultFuncs, api, ctx) {
134
193
  })
135
194
  .catch(function (err) {
136
195
  log.error("sendMessage", err);
137
- if (utils.getType(err) == "Object" && err.error === "Not logged in.") ctx.loggedIn = false;
196
+ if (utils.getType(err) == "Object" && err.error === "Not logged in.") {
197
+ ctx.loggedIn = false;
198
+ }
138
199
  return callback(err);
139
200
  });
140
201
  }
@@ -143,10 +204,15 @@ module.exports = function (defaultFuncs, api, ctx) {
143
204
  // We're doing a query to this to check if the given id is the id of
144
205
  // a user or of a group chat. The form will be different depending
145
206
  // on that.
146
- if (utils.getType(threadID) === "Array") sendContent(form, threadID, false, messageAndOTID, callback);
147
- else {
148
- if (utils.getType(isGroup) != "Boolean") sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
149
- else sendContent(form, threadID, !isGroup, messageAndOTID, callback);
207
+ if (utils.getType(threadID) === "Array") {
208
+ sendContent(form, threadID, false, messageAndOTID, callback);
209
+ } else {
210
+ if (utils.getType(isGroup) != "Boolean") {
211
+ // Removed the use of api.getUserInfo() in the old version to reduce account lockout
212
+ sendContent(form, threadID, threadID.toString().length < 16, messageAndOTID, callback);
213
+ } else {
214
+ sendContent(form, threadID, !isGroup, messageAndOTID, callback);
215
+ }
150
216
  }
151
217
  }
152
218
 
@@ -154,35 +220,57 @@ module.exports = function (defaultFuncs, api, ctx) {
154
220
  if (msg.url) {
155
221
  form["shareable_attachment[share_type]"] = "100";
156
222
  getUrl(msg.url, function (err, params) {
157
- if (err) return callback(err);
223
+ if (err) {
224
+ return callback(err);
225
+ }
226
+
158
227
  form["shareable_attachment[share_params]"] = params;
159
228
  cb();
160
229
  });
230
+ } else {
231
+ cb();
161
232
  }
162
- else cb();
163
233
  }
164
234
 
165
235
  function handleLocation(msg, form, callback, cb) {
166
236
  if (msg.location) {
167
- if (msg.location.latitude == null || msg.location.longitude == null) return callback({ error: "location property needs both latitude and longitude" });
237
+ if (msg.location.latitude == null || msg.location.longitude == null) {
238
+ return callback({ error: "location property needs both latitude and longitude" });
239
+ }
240
+
168
241
  form["location_attachment[coordinates][latitude]"] = msg.location.latitude;
169
242
  form["location_attachment[coordinates][longitude]"] = msg.location.longitude;
170
243
  form["location_attachment[is_current_location]"] = !!msg.location.current;
171
244
  }
245
+
172
246
  cb();
173
247
  }
174
248
 
175
249
  function handleSticker(msg, form, callback, cb) {
176
- if (msg.sticker) form["sticker_id"] = msg.sticker;
250
+ if (msg.sticker) {
251
+ form["sticker_id"] = msg.sticker;
252
+ }
177
253
  cb();
178
254
  }
179
255
 
180
256
  function handleEmoji(msg, form, callback, cb) {
181
- if (msg.emojiSize != null && msg.emoji == null) return callback({ error: "emoji property is empty" });
257
+ if (msg.emojiSize != null && msg.emoji == null) {
258
+ return callback({ error: "emoji property is empty" });
259
+ }
182
260
  if (msg.emoji) {
183
- if (msg.emojiSize == null) msg.emojiSize = "medium";
184
- if (msg.emojiSize != "small" && msg.emojiSize != "medium" && msg.emojiSize != "large") return callback({ error: "emojiSize property is invalid" });
185
- if (form["body"] != null && form["body"] != "") return callback({ error: "body is not empty" });
261
+ if (msg.emojiSize == null) {
262
+ msg.emojiSize = "medium";
263
+ }
264
+ if (
265
+ msg.emojiSize != "small" &&
266
+ msg.emojiSize != "medium" &&
267
+ msg.emojiSize != "large"
268
+ ) {
269
+ return callback({ error: "emojiSize property is invalid" });
270
+ }
271
+ if (form["body"] != null && form["body"] != "") {
272
+ return callback({ error: "body is not empty" });
273
+ }
186
274
  form["body"] = msg.emoji;
187
275
  form["tags[0]"] = "hot_emoji_size:" + msg.emojiSize;
188
276
  }
@@ -197,39 +285,52 @@ module.exports = function (defaultFuncs, api, ctx) {
197
285
  form["video_ids"] = [];
198
286
  form["audio_ids"] = [];
199
287
 
200
- if (utils.getType(msg.attachment) !== "Array") msg.attachment = [msg.attachment];
201
- if (msg.attachment.every(e=>/_id$/.test(e[0]))) {
202
- //console.log(msg.attachment)
203
- msg.attachment.map(e=>form[`${e[0]}s`].push(e[1]));
204
- return cb();
205
- }
288
+ if (utils.getType(msg.attachment) !== "Array") {
289
+ msg.attachment = [msg.attachment];
290
+ }
291
+
206
292
  uploadAttachment(msg.attachment, function (err, files) {
207
- if (err) return callback(err);
293
+ if (err) {
294
+ return callback(err);
295
+ }
296
+
208
297
  files.forEach(function (file) {
209
- var key = Object.keys(file);
210
- var type = key[0]; // image_id, file_id, etc
298
+ const key = Object.keys(file);
299
+ const type = key[0]; // image_id, file_id, etc
211
300
  form["" + type + "s"].push(file[type]); // push the id
212
301
  });
213
302
  cb();
214
303
  });
304
+ } else {
305
+ cb();
215
306
  }
216
- else cb();
217
307
  }
218
308
 
219
309
  function handleMention(msg, form, callback, cb) {
220
310
  if (msg.mentions) {
221
311
  for (let i = 0; i < msg.mentions.length; i++) {
222
312
  const mention = msg.mentions[i];
313
+
223
314
  const tag = mention.tag;
224
- if (typeof tag !== "string") return callback({ error: "Mention tags must be strings." });
315
+ if (typeof tag !== "string") {
316
+ return callback({ error: "Mention tags must be strings." });
317
+ }
318
+
225
319
  const offset = msg.body.indexOf(tag, mention.fromIndex || 0);
226
- if (offset < 0) log.warn("handleMention", 'Mention for "' + tag + '" not found in message string.');
227
- if (mention.id == null) log.warn("handleMention", "Mention id should be non-null.");
320
+
321
+ if (offset < 0) {
322
+ log.warn(
323
+ "handleMention",
324
+ 'Mention for "' + tag + '" not found in message string.'
325
+ );
326
+ }
327
+
328
+ if (mention.id == null) {
329
+ log.warn("handleMention", "Mention id should be non-null.");
330
+ }
228
331
 
229
332
  const id = mention.id || 0;
230
- const emptyChar = '\u200E';
231
- form["body"] = emptyChar + msg.body;
232
- form["profile_xmd[" + i + "][offset]"] = offset + 1;
333
+ form["profile_xmd[" + i + "][offset]"] = offset;
233
334
  form["profile_xmd[" + i + "][length]"] = tag.length;
234
335
  form["profile_xmd[" + i + "][id]"] = id;
235
336
  form["profile_xmd[" + i + "][type]"] = "p";
@@ -240,47 +341,94 @@ module.exports = function (defaultFuncs, api, ctx) {
240
341
 
241
342
  return function sendMessage(msg, threadID, callback, replyToMessage, isGroup) {
242
343
  typeof isGroup == "undefined" ? isGroup = null : "";
243
- if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) return threadID({ error: "Pass a threadID as a second argument." });
244
- if (!replyToMessage && utils.getType(callback) === "String") {
344
+ if (
345
+ !callback &&
346
+ (utils.getType(threadID) === "Function" ||
347
+ utils.getType(threadID) === "AsyncFunction")
348
+ ) {
349
+ return threadID({ error: "Pass a threadID as a second argument." });
350
+ }
351
+ if (
352
+ !replyToMessage &&
353
+ utils.getType(callback) === "String"
354
+ ) {
245
355
  replyToMessage = callback;
246
356
  callback = function () { };
247
357
  }
248
358
 
249
- var resolveFunc = function () { };
250
- var rejectFunc = function () { };
251
- var returnPromise = new Promise(function (resolve, reject) {
359
+ let resolveFunc = function () { };
360
+ let rejectFunc = function () { };
361
+ const returnPromise = new Promise(function (resolve, reject) {
252
362
  resolveFunc = resolve;
253
363
  rejectFunc = reject;
254
364
  });
255
365
 
256
366
  if (!callback) {
257
- callback = function (err, data) {
258
- if (err) return rejectFunc(err);
259
- resolveFunc(data);
367
+ callback = function (err, friendList) {
368
+ if (err) {
369
+ return rejectFunc(err);
370
+ }
371
+ resolveFunc(friendList);
260
372
  };
261
373
  }
262
374
 
263
- var msgType = utils.getType(msg);
264
- var threadIDType = utils.getType(threadID);
265
- var messageIDType = utils.getType(replyToMessage);
375
+ const msgType = utils.getType(msg);
376
+ const threadIDType = utils.getType(threadID);
377
+ const messageIDType = utils.getType(replyToMessage);
266
378
 
267
- if (msgType !== "String" && msgType !== "Object") return callback({ error: "Message should be of type string or object and not " + msgType + "." });
379
+ if (msgType !== "String" && msgType !== "Object") {
380
+ return callback({
381
+ error:
382
+ "Message should be of type string or object and not " + msgType + "."
383
+ });
384
+ }
268
385
 
269
386
  // Changing this to accomodate an array of users
270
- if (threadIDType !== "Array" && threadIDType !== "Number" && threadIDType !== "String") return callback({ error: "ThreadID should be of type number, string, or array and not " + threadIDType + "." });
387
+ if (
388
+ threadIDType !== "Array" &&
389
+ threadIDType !== "Number" &&
390
+ threadIDType !== "String"
391
+ ) {
392
+ return callback({
393
+ error:
394
+ "ThreadID should be of type number, string, or array and not " +
395
+ threadIDType +
396
+ "."
397
+ });
398
+ }
399
+
400
+ if (replyToMessage && messageIDType !== 'String') {
401
+ return callback({
402
+ error:
403
+ "MessageID should be of type string and not " +
404
+ threadIDType +
405
+ "."
406
+ });
407
+ }
408
+
409
+ if (msgType === "String") {
410
+ msg = { body: msg };
411
+ }
412
+
413
+ if (utils.getType(msg.body) === "String") {
414
+ msg.body = removeSpecialChar(msg.body);
415
+ }
271
416
 
272
- if (replyToMessage && messageIDType !== 'String') return callback({ error: "MessageID should be of type string and not " + threadIDType + "." });
417
+ const disallowedProperties = Object.keys(msg).filter(
418
+ prop => !allowedProperties[prop]
419
+ );
420
+ if (disallowedProperties.length > 0) {
421
+ return callback({
422
+ error: "Dissallowed props: `" + disallowedProperties.join(", ") + "`"
423
+ });
424
+ }
273
425
 
274
- if (msgType === "String") msg = { body: msg };
275
- var disallowedProperties = Object.keys(msg).filter(prop => !allowedProperties[prop]);
276
- if (disallowedProperties.length > 0) return callback({ error: "Dissallowed props: `" + disallowedProperties.join(", ") + "`" });
426
+ const messageAndOTID = utils.generateOfflineThreadingID();
277
427
 
278
- var messageAndOTID = utils.generateOfflineThreadingID();
279
- // console.log(messageAndOTID)
280
- var form = {
428
+ const form = {
281
429
  client: "mercury",
282
430
  action_type: "ma-type:user-generated-message",
283
- author: "fbid:" + ctx.userID,
431
+ author: "fbid:" + (ctx.i_userID || ctx.userID),
284
432
  timestamp: Date.now(),
285
433
  timestamp_absolute: "Today",
286
434
  timestamp_relative: utils.generateTimestampRelative(),
@@ -309,7 +457,6 @@ module.exports = function (defaultFuncs, api, ctx) {
309
457
  signatureID: utils.getSignatureID(),
310
458
  replied_to_message_id: replyToMessage
311
459
  };
312
- // console.log(form)
313
460
 
314
461
  handleLocation(msg, form, callback, () =>
315
462
  handleSticker(msg, form, callback, () =>
@@ -324,6 +471,7 @@ module.exports = function (defaultFuncs, api, ctx) {
324
471
  )
325
472
  )
326
473
  );
474
+
327
475
  return returnPromise;
328
476
  };
329
- };
477
+ };