alicezetion 1.7.1 → 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -1
  2. package/.cache/replit/nix/env.json +1 -1
  3. package/Extra/Database/index.js +399 -0
  4. package/Extra/Database/methods.js +286 -0
  5. package/Extra/ExtraAddons.js +213 -0
  6. package/Extra/ExtraGetThread.js +1 -0
  7. package/Extra/ExtraUptimeRobot.js +59 -0
  8. package/Extra/PM2/ecosystem.config.js +23 -0
  9. package/Extra/Src/Last-Run.js +48 -0
  10. package/Language/index.json +151 -0
  11. package/StateCrypt.js +22 -0
  12. package/broadcast.js +42 -0
  13. package/index.js +655 -120
  14. package/logger.js +21 -0
  15. package/package.json +37 -25
  16. package/replit.nix +3 -4
  17. package/src/addExternalModule.js +13 -5
  18. package/src/addUserToGroup.js +36 -12
  19. package/src/changeAdminStatus.js +85 -37
  20. package/src/changeArchivedStatus.js +15 -9
  21. package/src/changeAvt.js +91 -0
  22. package/src/changeBio.js +13 -8
  23. package/src/changeBlockedStatus.js +14 -8
  24. package/src/changeGroupImage.js +28 -13
  25. package/src/changeNickname.js +22 -11
  26. package/src/changeThreadColor.js +16 -10
  27. package/src/changeThreadEmoji.js +18 -9
  28. package/src/chat.js +401 -280
  29. package/src/createNewGroup.js +18 -10
  30. package/src/createPoll.js +17 -11
  31. package/src/deleteMessage.js +17 -10
  32. package/src/deleteThread.js +17 -10
  33. package/src/forwardAttachment.js +15 -9
  34. package/src/getAccessToken.js +32 -0
  35. package/src/getCurrentUserID.js +1 -1
  36. package/src/getEmojiUrl.js +3 -2
  37. package/src/getFriendsList.js +18 -10
  38. package/src/getMessage.js +84 -0
  39. package/src/getThreadHistory.js +156 -59
  40. package/src/getThreadHistoryDeprecated.js +26 -15
  41. package/src/getThreadInfo.js +68 -42
  42. package/src/getThreadInfoDeprecated.js +25 -13
  43. package/src/getThreadList.js +112 -53
  44. package/src/getThreadListDeprecated.js +30 -12
  45. package/src/getThreadPictures.js +25 -13
  46. package/src/getUserID.js +9 -7
  47. package/src/getUserInfo.js +12 -10
  48. package/src/getUserInfoV2.js +35 -0
  49. package/src/handleFriendRequest.js +36 -35
  50. package/src/handleMessageRequest.js +18 -10
  51. package/src/httpGet.js +20 -13
  52. package/src/httpPost.js +19 -13
  53. package/src/httpPostFormData.js +46 -0
  54. package/src/listenMqtt.js +1224 -621
  55. package/src/logout.js +18 -13
  56. package/src/markAsDelivered.js +17 -10
  57. package/src/markAsRead.js +36 -24
  58. package/src/markAsSeen.js +22 -12
  59. package/src/muteThread.js +15 -9
  60. package/src/{setMessageReaction.js → react.js} +20 -9
  61. package/src/removeUserFromGroup.js +38 -11
  62. package/src/resolvePhotoUrl.js +9 -6
  63. package/src/searchForThread.js +14 -8
  64. package/src/{markAsReadAll.js → seen.js} +17 -10
  65. package/src/sendTypingIndicator.js +44 -19
  66. package/src/setPostReaction.js +63 -22
  67. package/src/setTitle.js +22 -12
  68. package/src/threadColors.js +17 -19
  69. package/src/unfriend.js +15 -9
  70. package/src/{unsendMessage.js → unsend.js} +9 -8
  71. package/utils.js +120 -27
  72. package/.travis.yml +0 -6
  73. package/src/forwardMessage.js +0 -0
  74. package/src/listen.js +0 -553
  75. package/src/listenMqtt-Test.js +0 -687
  76. package/src/sendMessage.js +0 -315
  77. package/test/data/shareAttach.js +0 -146
  78. package/test/data/something.mov +0 -0
  79. package/test/data/test.png +0 -0
  80. package/test/data/test.txt +0 -7
  81. package/test/example-config.json +0 -18
  82. package/test/test-page.js +0 -140
  83. package/test/test.js +0 -385
@@ -29,10 +29,10 @@ function formatAttachmentsGraphQLResponse(attachment) {
29
29
  // @Undocumented
30
30
  attributionApp: attachment.attribution_app
31
31
  ? {
32
- attributionAppID: attachment.attribution_app.id,
33
- name: attachment.attribution_app.name,
34
- logo: attachment.attribution_app.square_logo
35
- }
32
+ attributionAppID: attachment.attribution_app.id,
33
+ name: attachment.attribution_app.name,
34
+ logo: attachment.attribution_app.square_logo
35
+ }
36
36
  : null
37
37
 
38
38
  // @TODO No idea what this is, should we expose it?
@@ -78,10 +78,10 @@ function formatAttachmentsGraphQLResponse(attachment) {
78
78
  // @Undocumented
79
79
  attributionApp: attachment.attribution_app
80
80
  ? {
81
- attributionAppID: attachment.attribution_app.id,
82
- name: attachment.attribution_app.name,
83
- logo: attachment.attribution_app.square_logo
84
- }
81
+ attributionAppID: attachment.attribution_app.id,
82
+ name: attachment.attribution_app.name,
83
+ logo: attachment.attribution_app.square_logo
84
+ }
85
85
  : null
86
86
  };
87
87
  case "MessageVideo":
@@ -144,15 +144,56 @@ function formatExtensibleAttachment(attachment) {
144
144
  url: attachment.story_attachment.url,
145
145
 
146
146
  title: attachment.story_attachment.title_with_entities.text,
147
- description: attachment.story_attachment.description && attachment.story_attachment.description.text,
148
- source: attachment.story_attachment.source == null ? null : attachment.story_attachment.source.text,
149
-
150
- image: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.animated_image == null && attachment.story_attachment.media.image == null ? null : (attachment.story_attachment.media.animated_image || attachment.story_attachment.media.image).uri,
151
- width: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.animated_image == null && attachment.story_attachment.media.image == null ? null : (attachment.story_attachment.media.animated_image || attachment.story_attachment.media.image).width,
152
- height: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.animated_image == null && attachment.story_attachment.media.image == null ? null : (attachment.story_attachment.media.animated_image || attachment.story_attachment.media.image).height,
153
- playable: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.is_playable,
154
- duration: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.playable_duration_in_ms,
155
- playableUrl: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.playable_url,
147
+ description:
148
+ attachment.story_attachment.description &&
149
+ attachment.story_attachment.description.text,
150
+ source:
151
+ attachment.story_attachment.source == null
152
+ ? null
153
+ : attachment.story_attachment.source.text,
154
+
155
+ image:
156
+ attachment.story_attachment.media == null
157
+ ? null
158
+ : attachment.story_attachment.media.animated_image == null &&
159
+ attachment.story_attachment.media.image == null
160
+ ? null
161
+ : (
162
+ attachment.story_attachment.media.animated_image ||
163
+ attachment.story_attachment.media.image
164
+ ).uri,
165
+ width:
166
+ attachment.story_attachment.media == null
167
+ ? null
168
+ : attachment.story_attachment.media.animated_image == null &&
169
+ attachment.story_attachment.media.image == null
170
+ ? null
171
+ : (
172
+ attachment.story_attachment.media.animated_image ||
173
+ attachment.story_attachment.media.image
174
+ ).width,
175
+ height:
176
+ attachment.story_attachment.media == null
177
+ ? null
178
+ : attachment.story_attachment.media.animated_image == null &&
179
+ attachment.story_attachment.media.image == null
180
+ ? null
181
+ : (
182
+ attachment.story_attachment.media.animated_image ||
183
+ attachment.story_attachment.media.image
184
+ ).height,
185
+ playable:
186
+ attachment.story_attachment.media == null
187
+ ? null
188
+ : attachment.story_attachment.media.is_playable,
189
+ duration:
190
+ attachment.story_attachment.media == null
191
+ ? null
192
+ : attachment.story_attachment.media.playable_duration_in_ms,
193
+ playableUrl:
194
+ attachment.story_attachment.media == null
195
+ ? null
196
+ : attachment.story_attachment.media.playable_url,
156
197
 
157
198
  subattachments: attachment.story_attachment.subattachments,
158
199
 
@@ -169,22 +210,52 @@ function formatExtensibleAttachment(attachment) {
169
210
  // width: "1280"
170
211
  // }
171
212
  //
172
- properties: attachment.story_attachment.properties.reduce(function (obj, cur) {
213
+ properties: attachment.story_attachment.properties.reduce(function(
214
+ obj,
215
+ cur
216
+ ) {
173
217
  obj[cur.key] = cur.value.text;
174
218
  return obj;
175
- }, {}),
219
+ },
220
+ {}),
176
221
 
177
222
  // Deprecated fields
178
223
  animatedImageSize: "", // @Legacy
179
224
  facebookUrl: "", // @Legacy
180
225
  styleList: "", // @Legacy
181
226
  target: "", // @Legacy
182
- thumbnailUrl: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.animated_image == null && attachment.story_attachment.media.image == null ? null : (attachment.story_attachment.media.animated_image || attachment.story_attachment.media.image).uri, // @Legacy
183
- thumbnailWidth: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.animated_image == null && attachment.story_attachment.media.image == null ? null : (attachment.story_attachment.media.animated_image || attachment.story_attachment.media.image).width, // @Legacy
184
- thumbnailHeight: attachment.story_attachment.media == null ? null : attachment.story_attachment.media.animated_image == null && attachment.story_attachment.media.image == null ? null : (attachment.story_attachment.media.animated_image || attachment.story_attachment.media.image).height // @Legacy
227
+ thumbnailUrl:
228
+ attachment.story_attachment.media == null
229
+ ? null
230
+ : attachment.story_attachment.media.animated_image == null &&
231
+ attachment.story_attachment.media.image == null
232
+ ? null
233
+ : (
234
+ attachment.story_attachment.media.animated_image ||
235
+ attachment.story_attachment.media.image
236
+ ).uri, // @Legacy
237
+ thumbnailWidth:
238
+ attachment.story_attachment.media == null
239
+ ? null
240
+ : attachment.story_attachment.media.animated_image == null &&
241
+ attachment.story_attachment.media.image == null
242
+ ? null
243
+ : (
244
+ attachment.story_attachment.media.animated_image ||
245
+ attachment.story_attachment.media.image
246
+ ).width, // @Legacy
247
+ thumbnailHeight:
248
+ attachment.story_attachment.media == null
249
+ ? null
250
+ : attachment.story_attachment.media.animated_image == null &&
251
+ attachment.story_attachment.media.image == null
252
+ ? null
253
+ : (
254
+ attachment.story_attachment.media.animated_image ||
255
+ attachment.story_attachment.media.image
256
+ ).height // @Legacy
185
257
  };
186
- }
187
- else return { error: "Don't know what to do with extensible_attachment." };
258
+ } else return { error: "Don't know what to do with extensible_attachment." };
188
259
  }
189
260
 
190
261
  function formatReactionsGraphQL(reaction) {
@@ -195,7 +266,7 @@ function formatReactionsGraphQL(reaction) {
195
266
  }
196
267
 
197
268
  function formatEventData(event) {
198
- if (event == null) return {}
269
+ if (event == null) return {};
199
270
 
200
271
  switch (event.__typename) {
201
272
  case "ThemeColorExtensibleMessageAdminText":
@@ -209,7 +280,7 @@ function formatEventData(event) {
209
280
  return { threadIcon: event.thread_icon };
210
281
  case "InstantGameUpdateExtensibleMessageAdminText":
211
282
  return {
212
- gameID: (event.game == null ? null : event.game.id),
283
+ gameID: event.game == null ? null : event.game.id,
213
284
  update_type: event.update_type,
214
285
  collapsed_text: event.collapsed_text,
215
286
  expanded_text: event.expanded_text,
@@ -264,15 +335,19 @@ function formatEventData(event) {
264
335
  case "LightweightEventDeleteExtensibleMessageAdminText":
265
336
  return {};
266
337
  default:
267
- return { error: "Don't know what to with event data type " + event.__typename };
338
+ return {
339
+ error: "Don't know what to with event data type " + event.__typename
340
+ };
268
341
  }
269
342
  }
270
343
 
271
344
  function formatMessagesGraphQLResponse(data) {
272
345
  var messageThread = data.o0.data.message_thread;
273
- var threadID = messageThread.thread_key.thread_fbid ? messageThread.thread_key.thread_fbid : messageThread.thread_key.other_user_id;
346
+ var threadID = messageThread.thread_key.thread_fbid
347
+ ? messageThread.thread_key.thread_fbid
348
+ : messageThread.thread_key.other_user_id;
274
349
 
275
- var messages = messageThread.messages.nodes.map(function (d) {
350
+ var messages = messageThread.messages.nodes.map(function(d) {
276
351
  switch (d.__typename) {
277
352
  case "UserMessage":
278
353
  // Give priority to stickers. They're seen as normal messages but we've
@@ -308,7 +383,13 @@ function formatMessagesGraphQLResponse(data) {
308
383
 
309
384
  var mentionsObj = {};
310
385
  if (d.message !== null) {
311
- d.message.ranges.forEach(e => mentionsObj[e.entity.id] = d.message.text.substr(e.offset, e.length));
386
+ d.message.ranges.forEach(
387
+ e =>
388
+ (mentionsObj[e.entity.id] = d.message.text.substr(
389
+ e.offset,
390
+ e.length
391
+ ))
392
+ );
312
393
  }
313
394
 
314
395
  return {
@@ -320,7 +401,7 @@ function formatMessagesGraphQLResponse(data) {
320
401
  : d.extensible_attachment
321
402
  ? [formatExtensibleAttachment(d.extensible_attachment)]
322
403
  : [],
323
- body: d.message !== null ? d.message.text : '',
404
+ body: d.message !== null ? d.message.text : "",
324
405
  isGroup: messageThread.thread_type === "GROUP",
325
406
  messageID: d.message_id,
326
407
  senderID: d.message_sender.id,
@@ -331,7 +412,9 @@ function formatMessagesGraphQLResponse(data) {
331
412
  isUnread: d.unread,
332
413
 
333
414
  // New
334
- messageReactions: d.message_reactions ? d.message_reactions.map(formatReactionsGraphQL) : null,
415
+ messageReactions: d.message_reactions
416
+ ? d.message_reactions.map(formatReactionsGraphQL)
417
+ : null,
335
418
  isSponsored: d.is_sponsored,
336
419
  snippet: d.snippet
337
420
  };
@@ -362,21 +445,26 @@ function formatMessagesGraphQLResponse(data) {
362
445
  timestamp: d.timestamp_precise,
363
446
  eventType: "change_thread_image",
364
447
  snippet: d.snippet,
365
- eventData: d.image_with_metadata == null
366
- ? {} /* removed image */
367
- : {
368
- /* image added */
369
- threadImage: {
370
- attachmentID: d.image_with_metadata.legacy_attachment_id,
371
- width: d.image_with_metadata.original_dimensions.x,
372
- height: d.image_with_metadata.original_dimensions.y,
373
- url: d.image_with_metadata.preview.uri
374
- }
375
- },
448
+ eventData:
449
+ d.image_with_metadata == null
450
+ ? {} /* removed image */
451
+ : {
452
+ /* image added */
453
+ threadImage: {
454
+ attachmentID: d.image_with_metadata.legacy_attachment_id,
455
+ width: d.image_with_metadata.original_dimensions.x,
456
+ height: d.image_with_metadata.original_dimensions.y,
457
+ url: d.image_with_metadata.preview.uri
458
+ }
459
+ },
376
460
 
377
461
  // @Legacy
378
462
  logMessageType: "log:thread-icon",
379
- logMessageData: { thread_icon: d.image_with_metadata ? d.image_with_metadata.preview.uri : null }
463
+ logMessageData: {
464
+ thread_icon: d.image_with_metadata
465
+ ? d.image_with_metadata.preview.uri
466
+ : null
467
+ }
380
468
  };
381
469
  case "ParticipantLeftMessage":
382
470
  return {
@@ -390,7 +478,7 @@ function formatMessagesGraphQLResponse(data) {
390
478
  snippet: d.snippet,
391
479
  eventData: {
392
480
  // Array of IDs.
393
- participantsRemoved: d.participants_removed.map(function (p) {
481
+ participantsRemoved: d.participants_removed.map(function(p) {
394
482
  return p.id;
395
483
  })
396
484
  },
@@ -398,7 +486,7 @@ function formatMessagesGraphQLResponse(data) {
398
486
  // @Legacy
399
487
  logMessageType: "log:unsubscribe",
400
488
  logMessageData: {
401
- leftParticipantFbId: d.participants_removed.map(function (p) {
489
+ leftParticipantFbId: d.participants_removed.map(function(p) {
402
490
  return p.id;
403
491
  })
404
492
  }
@@ -415,7 +503,7 @@ function formatMessagesGraphQLResponse(data) {
415
503
  snippet: d.snippet,
416
504
  eventData: {
417
505
  // Array of IDs.
418
- participantsAdded: d.participants_added.map(function (p) {
506
+ participantsAdded: d.participants_added.map(function(p) {
419
507
  return p.id;
420
508
  })
421
509
  },
@@ -423,7 +511,7 @@ function formatMessagesGraphQLResponse(data) {
423
511
  // @Legacy
424
512
  logMessageType: "log:subscribe",
425
513
  logMessageData: {
426
- addedParticipants: d.participants_added.map(function (p) {
514
+ addedParticipants: d.participants_added.map(function(p) {
427
515
  return p.id;
428
516
  })
429
517
  }
@@ -481,17 +569,22 @@ function formatMessagesGraphQLResponse(data) {
481
569
  return messages;
482
570
  }
483
571
 
484
- module.exports = function (defaultFuncs, api, ctx) {
485
- return function getThreadHistoryGraphQL(threadID, amount, timestamp, callback) {
486
- var resolveFunc = function () { };
487
- var rejectFunc = function () { };
488
- var returnPromise = new Promise(function (resolve, reject) {
572
+ module.exports = function(defaultFuncs, api, ctx) {
573
+ return function getThreadHistoryGraphQL(
574
+ threadID,
575
+ amount,
576
+ timestamp,
577
+ callback
578
+ ) {
579
+ var resolveFunc = function() {};
580
+ var rejectFunc = function() {};
581
+ var returnPromise = new Promise(function(resolve, reject) {
489
582
  resolveFunc = resolve;
490
583
  rejectFunc = reject;
491
584
  });
492
585
 
493
586
  if (!callback) {
494
- callback = function (err, data) {
587
+ callback = function(err, data) {
495
588
  if (err) return rejectFunc(err);
496
589
  resolveFunc(data);
497
590
  };
@@ -500,7 +593,7 @@ module.exports = function (defaultFuncs, api, ctx) {
500
593
  // `queries` has to be a string. I couldn't tell from the dev console. This
501
594
  // took me a really long time to figure out. I deserve a cookie for this.
502
595
  var form = {
503
- "av": ctx.globalOptions.pageID,
596
+ av: ctx.globalOptions.pageID,
504
597
  queries: JSON.stringify({
505
598
  o0: {
506
599
  // This doc_id was valid on February 2nd 2017.
@@ -519,16 +612,20 @@ module.exports = function (defaultFuncs, api, ctx) {
519
612
  defaultFuncs
520
613
  .post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
521
614
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
522
- .then(function (resData) {
615
+ .then(function(resData) {
523
616
  if (resData.error) throw resData;
524
617
  // This returns us an array of things. The last one is the success /
525
618
  // failure one.
526
619
  // @TODO What do we do in this case?
527
- if (resData[resData.length - 1].error_results !== 0) throw new Error("There was an error_result.");
620
+ if (resData[resData.length - 1].error_results !== 0)
621
+ throw new Error("There was an error_result.");
528
622
  callback(null, formatMessagesGraphQLResponse(resData[0]));
529
623
  })
530
- .catch(function (err) {
531
- log.error("getThreadHistoryGraphQL", err);
624
+ .catch(function(err) {
625
+ log.error(
626
+ "getThreadHistoryGraphQL",
627
+ "Lỗi getThreadHistoryGraphQL Có Thể Do Bạn Spam Quá Nhiều, Hãy Thử Lại !"
628
+ );
532
629
  return callback(err);
533
630
  });
534
631
 
@@ -3,17 +3,17 @@
3
3
  var utils = require("../utils");
4
4
  var log = require("npmlog");
5
5
 
6
- module.exports = function (defaultFuncs, api, ctx) {
6
+ module.exports = function(defaultFuncs, api, ctx) {
7
7
  return function getThreadHistory(threadID, amount, timestamp, callback) {
8
- var resolveFunc = function () { };
9
- var rejectFunc = function () { };
10
- var returnPromise = new Promise(function (resolve, reject) {
8
+ var resolveFunc = function() {};
9
+ var rejectFunc = function() {};
10
+ var returnPromise = new Promise(function(resolve, reject) {
11
11
  resolveFunc = resolve;
12
12
  rejectFunc = reject;
13
13
  });
14
14
 
15
15
  if (!callback) {
16
- callback = function (err, threadInfo) {
16
+ callback = function(err, threadInfo) {
17
17
  if (err) return rejectFunc(err);
18
18
  resolveFunc(threadInfo);
19
19
  };
@@ -24,33 +24,41 @@ module.exports = function (defaultFuncs, api, ctx) {
24
24
  client: "mercury"
25
25
  };
26
26
 
27
- api.getUserInfo(threadID, function (err, res) {
27
+ api.getUserInfo(threadID, function(err, res) {
28
28
  if (err) return callback(err);
29
29
  var key = Object.keys(res).length > 0 ? "user_ids" : "thread_fbids";
30
30
  form["messages[" + key + "][" + threadID + "][offset]"] = 0;
31
31
  form["messages[" + key + "][" + threadID + "][timestamp]"] = timestamp;
32
32
  form["messages[" + key + "][" + threadID + "][limit]"] = amount;
33
33
 
34
- if (ctx.globalOptions.pageID) form.request_user_id = ctx.globalOptions.pageID;
34
+ if (ctx.globalOptions.pageID)
35
+ form.request_user_id = ctx.globalOptions.pageID;
35
36
 
36
37
  defaultFuncs
37
- .post("https://www.facebook.com/ajax/mercury/thread_info.php", ctx.jar, form)
38
+ .post(
39
+ "https://www.facebook.com/ajax/mercury/thread_info.php",
40
+ ctx.jar,
41
+ form
42
+ )
38
43
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
39
- .then(function (resData) {
44
+ .then(function(resData) {
40
45
  if (resData.error) throw resData;
41
- else if (!resData.payload) throw { error: "Could not retrieve thread history." };
46
+ else if (!resData.payload)
47
+ throw { error: "Could not retrieve thread history." };
42
48
 
43
49
  // Asking for message history from a thread with no message history
44
50
  // will return undefined for actions here
45
51
  if (!resData.payload.actions) resData.payload.actions = [];
46
52
 
47
53
  var userIDs = {};
48
- resData.payload.actions.forEach(v => userIDs[v.author.split(":").pop()] = "");
54
+ resData.payload.actions.forEach(
55
+ v => (userIDs[v.author.split(":").pop()] = "")
56
+ );
49
57
 
50
- api.getUserInfo(Object.keys(userIDs), function (err, data) {
58
+ api.getUserInfo(Object.keys(userIDs), function(err, data) {
51
59
  if (err) return callback(err); //callback({error: "Could not retrieve user information in getThreadHistory."});
52
60
 
53
- resData.payload.actions.forEach(function (v) {
61
+ resData.payload.actions.forEach(function(v) {
54
62
  var sender = data[v.author.split(":").pop()];
55
63
  if (sender) v.sender_name = sender.name;
56
64
  else v.sender_name = "Facebook User";
@@ -58,10 +66,13 @@ module.exports = function (defaultFuncs, api, ctx) {
58
66
  delete v.author;
59
67
  });
60
68
 
61
- callback(null, resData.payload.actions.map(utils.formatHistoryMessage));
69
+ callback(
70
+ null,
71
+ resData.payload.actions.map(utils.formatHistoryMessage)
72
+ );
62
73
  });
63
74
  })
64
- .catch(function (err) {
75
+ .catch(function(err) {
65
76
  log.error("getThreadHistory", err);
66
77
  return callback(err);
67
78
  });