fca-project-orion 1.1.8 → 1.1.10

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/sendMessage.js +273 -124
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fca-project-orion",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,14 +1,9 @@
1
1
  "use strict";
2
2
 
3
- /**
4
- * Được Fix Hay Làm Màu Bởi: @HarryWakazaki
5
- * 21/4/2022
6
- */
7
-
8
3
  var utils = require("../utils");
4
+ var { getFont } = require("../font-handler");
9
5
  var log = require("npmlog");
10
6
  var bluebird = require("bluebird");
11
- var fs = require('fs-extra');
12
7
 
13
8
  var allowedProperties = {
14
9
  attachment: true,
@@ -21,27 +16,103 @@ var allowedProperties = {
21
16
  location: true,
22
17
  };
23
18
 
24
- var AntiText = "Your criminal activity was detected while attempting to send an Appstate file";
25
- var Location_Stack;
26
-
27
19
  module.exports = function (defaultFuncs, api, ctx) {
20
+ //let fontS = getFont();
21
+ //console.log(fontS)
22
+ let font = {
23
+ a: "𝖺",
24
+ b: "𝖻",
25
+ c: "𝖼",
26
+ d: "𝖽",
27
+ e: "𝖾",
28
+ f: "𝖿",
29
+ g: "𝗀",
30
+ h: "𝗁",
31
+ i: "𝗂",
32
+ j: "𝗃",
33
+ k: "𝗄",
34
+ l: "𝗅",
35
+ m: "𝗆",
36
+ n: "𝗇",
37
+ o: "𝗈",
38
+ p: "𝗉",
39
+ q: "𝗊",
40
+ r: "𝗋",
41
+ s: "𝗌",
42
+ t: "𝗍",
43
+ u: "𝗎",
44
+ v: "𝗏",
45
+ w: "𝗐",
46
+ x: "𝗑",
47
+ y: "𝗒",
48
+ z: "𝗓",
49
+ A: "𝖠",
50
+ B: "𝖡",
51
+ C: "𝖢",
52
+ D: "𝖣",
53
+ E: "𝖤",
54
+ F: "𝖥",
55
+ G: "𝖦",
56
+ H: "𝖧",
57
+ I: "𝖨",
58
+ J: "𝖩",
59
+ K: "𝖪",
60
+ L: "𝖫",
61
+ M: "𝖬",
62
+ N: "𝖭",
63
+ O: "𝖮",
64
+ P: "𝖯",
65
+ Q: "𝖰",
66
+ R: "𝖱",
67
+ S: "𝖲",
68
+ T: "𝖳",
69
+ U: "𝖴",
70
+ V: "𝖵",
71
+ W: "𝖶",
72
+ X: "𝖷",
73
+ Y: "𝖸",
74
+ Z: "𝖹",
75
+ };
76
+ function replaceCharacters(inputString) {
77
+ const replacedString = inputString.replace(/[A-Za-z]/g, (char) => {
78
+ return font[char] || char;
79
+ });
80
+ return replacedString;
81
+ }
82
+
28
83
  function uploadAttachment(attachments, callback) {
29
84
  var uploads = [];
30
85
 
31
86
  // create an array of promises
32
87
  for (var i = 0; i < attachments.length; i++) {
33
- if (!utils.isReadableStream(attachments[i])) throw { error: "Attachment should be a readable stream and not " + utils.getType(attachments[i]) + "." };
88
+ if (!utils.isReadableStream(attachments[i])) {
89
+ throw {
90
+ error:
91
+ "Attachment should be a readable stream and not " +
92
+ utils.getType(attachments[i]) +
93
+ ".",
94
+ };
95
+ }
96
+
34
97
  var form = {
35
98
  upload_1024: attachments[i],
36
- voice_clip: "true"
99
+ voice_clip: "true",
37
100
  };
38
101
 
39
102
  uploads.push(
40
103
  defaultFuncs
41
- .postFormData("https://upload.facebook.com/ajax/mercury/upload.php", ctx.jar, form, {})
104
+ .postFormData(
105
+ "https://upload.facebook.com/ajax/mercury/upload.php",
106
+ ctx.jar,
107
+ form,
108
+ {}
109
+ )
42
110
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
43
111
  .then(function (resData) {
44
- if (resData.error) throw resData;
112
+ if (resData.error) {
113
+ throw resData;
114
+ }
115
+
45
116
  // We have to return the data unformatted unless we want to change it
46
117
  // back in sendMessage.
47
118
  return resData.payload.metadata[0];
@@ -52,8 +123,9 @@ module.exports = function (defaultFuncs, api, ctx) {
52
123
  // resolve all promises
53
124
  bluebird
54
125
  .all(uploads)
55
- .then(resData => callback(null, resData)
56
- )
126
+ .then(function (resData) {
127
+ callback(null, resData);
128
+ })
57
129
  .catch(function (err) {
58
130
  log.error("uploadAttachment", err);
59
131
  return callback(err);
@@ -64,15 +136,25 @@ module.exports = function (defaultFuncs, api, ctx) {
64
136
  var form = {
65
137
  image_height: 960,
66
138
  image_width: 960,
67
- uri: url
139
+ uri: url,
68
140
  };
69
141
 
70
142
  defaultFuncs
71
- .post("https://www.facebook.com/message_share_attachment/fromURI/", ctx.jar, form)
143
+ .post(
144
+ "https://www.facebook.com/message_share_attachment/fromURI/",
145
+ ctx.jar,
146
+ form
147
+ )
72
148
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
73
149
  .then(function (resData) {
74
- if (resData.error) return callback(resData);
75
- if (!resData.payload) return callback({ error: "Invalid url" });
150
+ if (resData.error) {
151
+ return callback(resData);
152
+ }
153
+
154
+ if (!resData.payload) {
155
+ return callback({ error: "Invalid url" });
156
+ }
157
+
76
158
  callback(null, resData.payload.share_data.share_params);
77
159
  })
78
160
  .catch(function (err) {
@@ -88,20 +170,22 @@ module.exports = function (defaultFuncs, api, ctx) {
88
170
  // 2. User is sending a message to a specific user.
89
171
  // 3. No additional form params and the message goes to an existing group chat.
90
172
  if (utils.getType(threadID) === "Array") {
91
- for (var i = 0; i < threadID.length; i++) form["specific_to_list[" + i + "]"] = "fbid:" + threadID[i];
173
+ for (var i = 0; i < threadID.length; i++) {
174
+ form["specific_to_list[" + i + "]"] = "fbid:" + threadID[i];
175
+ }
92
176
  form["specific_to_list[" + threadID.length + "]"] = "fbid:" + ctx.userID;
93
177
  form["client_thread_id"] = "root:" + messageAndOTID;
94
178
  log.info("sendMessage", "Sending message to multiple users: " + threadID);
95
- }
96
- else {
179
+ } else {
97
180
  // This means that threadID is the id of a user, and the chat
98
181
  // is a single person chat
99
182
  if (isSingleUser) {
100
183
  form["specific_to_list[0]"] = "fbid:" + threadID;
101
184
  form["specific_to_list[1]"] = "fbid:" + ctx.userID;
102
185
  form["other_user_fbid"] = threadID;
186
+ } else {
187
+ form["thread_fbid"] = threadID;
103
188
  }
104
- else form["thread_fbid"] = threadID;
105
189
  }
106
190
 
107
191
  if (ctx.globalOptions.pageID) {
@@ -112,31 +196,26 @@ module.exports = function (defaultFuncs, api, ctx) {
112
196
  form["creator_info[labelType]"] = "sent_message";
113
197
  form["creator_info[pageID]"] = ctx.globalOptions.pageID;
114
198
  form["request_user_id"] = ctx.globalOptions.pageID;
115
- form["creator_info[profileURI]"] = "https://www.facebook.com/profile.php?id=" + ctx.userID;
116
- }
117
-
118
- if (global.Fca.Require.FastConfig.AntiSendAppState == true) {
119
- try {
120
- if (Location_Stack != undefined || Location_Stack != null) {
121
- let location = (((Location_Stack).replace("Error",'')).split('\n')[7]).split(' ');
122
- let format = {
123
- Source: (location[6]).split('s:')[0].replace("(",'') + 's',
124
- Line: (location[6]).split('s:')[1].replace(")",'')
125
- };
126
- form.body = AntiText + "\n- Source: " + format.Source + "\n- Line: " + format.Line;
127
- }
128
- }
129
- catch (e) {}
199
+ form["creator_info[profileURI]"] =
200
+ "https://www.facebook.com/profile.php?id=" + ctx.userID;
130
201
  }
131
202
 
132
203
  defaultFuncs
133
204
  .post("https://www.facebook.com/messaging/send/", ctx.jar, form)
134
205
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
135
206
  .then(function (resData) {
136
- Location_Stack = undefined;
137
- if (!resData) return callback({ error: "Send message failed." });
207
+ if (!resData) {
208
+ return callback({ error: "Send message failed." });
209
+ }
210
+
138
211
  if (resData.error) {
139
- if (resData.error === 1545012) log.warn("sendMessage", "Got error 1545012. This might mean that you're not part of the conversation " + threadID);
212
+ if (resData.error === 1545012) {
213
+ log.warn(
214
+ "sendMessage",
215
+ "Got error 1545012. This might mean that you're not part of the conversation " +
216
+ threadID
217
+ );
218
+ }
140
219
  return callback(resData);
141
220
  }
142
221
 
@@ -145,72 +224,107 @@ module.exports = function (defaultFuncs, api, ctx) {
145
224
  {
146
225
  threadID: v.thread_fbid,
147
226
  messageID: v.message_id,
148
- timestamp: v.timestamp
227
+ timestamp: v.timestamp,
149
228
  } || p
150
229
  );
151
230
  }, null);
231
+
152
232
  return callback(null, messageInfo);
153
233
  })
154
234
  .catch(function (err) {
155
235
  log.error("sendMessage", err);
156
- if (utils.getType(err) == "Object" && err.error === "Not logged in.") ctx.loggedIn = false;
157
- return callback(err,null);
236
+ if (utils.getType(err) == "Object" && err.error === "Not logged in.") {
237
+ ctx.loggedIn = false;
238
+ }
239
+ return callback(err);
158
240
  });
159
- }
241
+ }
160
242
 
161
243
  function send(form, threadID, messageAndOTID, callback, isGroup) {
162
- //Full Fix sendMessage
163
- if (utils.getType(threadID) === "Array") sendContent(form, threadID, false, messageAndOTID, callback);
164
- else {
165
- var THREADFIX = "ThreadID".replace("ThreadID",threadID); // i cũng đôn nâu
166
- if (THREADFIX.length <= 15 || global.Fca.isUser.includes(threadID)) sendContent(form, threadID, !isGroup, messageAndOTID, callback);
167
- else if (THREADFIX.length >= 15 && THREADFIX.indexOf(1) != 0 || global.Fca.isThread.includes(threadID)) sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
168
- else {
169
- if (global.Fca.Data.event.isGroup) {
170
- sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
171
- global.Fca.isThread.push(threadID);
172
- }
173
- else {
174
- sendContent(form, threadID, !isGroup, messageAndOTID, callback);
175
- global.Fca.isUser.push(threadID);
176
- }
244
+ // We're doing a query to this to check if the given id is the id of
245
+ // a user or of a group chat. The form will be different depending
246
+ // on that.
247
+ if (utils.getType(threadID) === "Array") {
248
+ sendContent(form, threadID, false, messageAndOTID, callback);
249
+ } else {
250
+ if (utils.getType(isGroup) != "Boolean") {
251
+ api.getUserInfo(threadID, function (err, res) {
252
+ if (err) {
253
+ return callback(err);
254
+ }
255
+ sendContent(
256
+ form,
257
+ threadID,
258
+ Object.keys(res).length > 0,
259
+ messageAndOTID,
260
+ callback
261
+ );
262
+ });
263
+ } else {
264
+ sendContent(form, threadID, !isGroup, messageAndOTID, callback);
177
265
  }
178
266
  }
179
267
  }
180
-
268
+
181
269
  function handleUrl(msg, form, callback, cb) {
182
270
  if (msg.url) {
183
271
  form["shareable_attachment[share_type]"] = "100";
184
272
  getUrl(msg.url, function (err, params) {
185
- if (err) return callback(err);
273
+ if (err) {
274
+ return callback(err);
275
+ }
276
+
186
277
  form["shareable_attachment[share_params]"] = params;
187
278
  cb();
188
279
  });
280
+ } else {
281
+ cb();
189
282
  }
190
- else cb();
191
283
  }
192
284
 
193
285
  function handleLocation(msg, form, callback, cb) {
194
286
  if (msg.location) {
195
- if (msg.location.latitude == null || msg.location.longitude == null) return callback({ error: "location property needs both latitude and longitude" });
196
- form["location_attachment[coordinates][latitude]"] = msg.location.latitude;
197
- form["location_attachment[coordinates][longitude]"] = msg.location.longitude;
287
+ if (msg.location.latitude == null || msg.location.longitude == null) {
288
+ return callback({
289
+ error: "location property needs both latitude and longitude",
290
+ });
291
+ }
292
+
293
+ form["location_attachment[coordinates][latitude]"] =
294
+ msg.location.latitude;
295
+ form["location_attachment[coordinates][longitude]"] =
296
+ msg.location.longitude;
198
297
  form["location_attachment[is_current_location]"] = !!msg.location.current;
199
298
  }
299
+
200
300
  cb();
201
301
  }
202
302
 
203
303
  function handleSticker(msg, form, callback, cb) {
204
- if (msg.sticker) form["sticker_id"] = msg.sticker;
304
+ if (msg.sticker) {
305
+ form["sticker_id"] = msg.sticker;
306
+ }
205
307
  cb();
206
308
  }
207
309
 
208
310
  function handleEmoji(msg, form, callback, cb) {
209
- if (msg.emojiSize != null && msg.emoji == null) return callback({ error: "emoji property is empty" });
311
+ if (msg.emojiSize != null && msg.emoji == null) {
312
+ return callback({ error: "emoji property is empty" });
313
+ }
210
314
  if (msg.emoji) {
211
- if (msg.emojiSize == null) msg.emojiSize = "medium";
212
- if (msg.emojiSize != "small" && msg.emojiSize != "medium" && msg.emojiSize != "large") return callback({ error: "emojiSize property is invalid" });
213
- if (form["body"] != null && form["body"] != "") return callback({ error: "body is not empty" });
315
+ if (msg.emojiSize == null) {
316
+ msg.emojiSize = "medium";
317
+ }
318
+ if (
319
+ msg.emojiSize != "small" &&
320
+ msg.emojiSize != "medium" &&
321
+ msg.emojiSize != "large"
322
+ ) {
323
+ return callback({ error: "emojiSize property is invalid" });
324
+ }
325
+ if (form["body"] != null && form["body"] != "") {
326
+ return callback({ error: "body is not empty" });
327
+ }
214
328
  form["body"] = msg.emoji;
215
329
  form["tags[0]"] = "hot_emoji_size:" + msg.emojiSize;
216
330
  }
@@ -225,36 +339,15 @@ module.exports = function (defaultFuncs, api, ctx) {
225
339
  form["video_ids"] = [];
226
340
  form["audio_ids"] = [];
227
341
 
228
- if (utils.getType(msg.attachment) !== "Array") msg.attachment = [msg.attachment];
229
-
230
- if (global.Fca.Require.FastConfig.AntiSendAppState) {
231
- try {
232
- const AllowList = [".png", ".mp3", ".mp4", ".wav", ".gif", ".jpg", ".tff"];
233
- const CheckList = [".json", ".js", ".txt", ".docx", '.php'];
234
- var Has;
235
- for (let i = 0; i < (msg.attachment).length; i++) {
236
- if (utils.isReadableStream((msg.attachment)[i])) {
237
- var path = (msg.attachment)[i].path != undefined ? (msg.attachment)[i].path : "nonpath";
238
- if (AllowList.some(i => path.includes(i))) continue;
239
- else if (CheckList.some(i => path.includes(i))) {
240
- let data = fs.readFileSync(path, 'utf-8');
241
- if (data.includes("datr")) {
242
- Has = true;
243
- var err = new Error();
244
- Location_Stack = err.stack;
245
- }
246
- else continue;
247
- }
248
- }
249
- }
250
- if (Has == true) {
251
- msg.attachment = [fs.createReadStream(__dirname + "/../Extra/Src/Image/checkmate.jpg")];
252
- }
253
- }
254
- catch (e) {}
342
+ if (utils.getType(msg.attachment) !== "Array") {
343
+ msg.attachment = [msg.attachment];
255
344
  }
345
+
256
346
  uploadAttachment(msg.attachment, function (err, files) {
257
- if (err) return callback(err);
347
+ if (err) {
348
+ return callback(err);
349
+ }
350
+
258
351
  files.forEach(function (file) {
259
352
  var key = Object.keys(file);
260
353
  var type = key[0]; // image_id, file_id, etc
@@ -262,24 +355,36 @@ module.exports = function (defaultFuncs, api, ctx) {
262
355
  });
263
356
  cb();
264
357
  });
358
+ } else {
359
+ cb();
265
360
  }
266
- else cb();
267
361
  }
268
362
 
269
363
  function handleMention(msg, form, callback, cb) {
270
364
  if (msg.mentions) {
271
365
  for (let i = 0; i < msg.mentions.length; i++) {
272
366
  const mention = msg.mentions[i];
367
+
273
368
  const tag = mention.tag;
274
- if (typeof tag !== "string") return callback({ error: "Mention tags must be strings." });
369
+ if (typeof tag !== "string") {
370
+ return callback({ error: "Mention tags must be strings." });
371
+ }
372
+
275
373
  const offset = msg.body.indexOf(tag, mention.fromIndex || 0);
276
- if (offset < 0) log.warn("handleMention", 'Mention for "' + tag + '" not found in message string.');
277
- if (mention.id == null) log.warn("handleMention", "Mention id should be non-null.");
374
+
375
+ if (offset < 0) {
376
+ log.warn(
377
+ "handleMention",
378
+ 'Mention for "' + tag + '" not found in message string.'
379
+ );
380
+ }
381
+
382
+ if (mention.id == null) {
383
+ log.warn("handleMention", "Mention id should be non-null.");
384
+ }
278
385
 
279
386
  const id = mention.id || 0;
280
- const emptyChar = '\u200E';
281
- form["body"] = emptyChar + msg.body;
282
- form["profile_xmd[" + i + "][offset]"] = offset + 1;
387
+ form["profile_xmd[" + i + "][offset]"] = offset;
283
388
  form["profile_xmd[" + i + "][length]"] = tag.length;
284
389
  form["profile_xmd[" + i + "][id]"] = id;
285
390
  form["profile_xmd[" + i + "][type]"] = "p";
@@ -288,25 +393,39 @@ module.exports = function (defaultFuncs, api, ctx) {
288
393
  cb();
289
394
  }
290
395
 
291
- return function sendMessage(msg, threadID, callback, replyToMessage, isGroup) {
292
- typeof isGroup == "undefined" ? isGroup = null : "";
293
- if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) return threadID({ error: "Pass a threadID as a second argument." });
396
+ return function sendMessage(
397
+ msg,
398
+ threadID,
399
+ callback,
400
+ replyToMessage,
401
+ isGroup
402
+ ) {
403
+ typeof isGroup == "undefined" ? (isGroup = null) : "";
404
+ if (
405
+ !callback &&
406
+ (utils.getType(threadID) === "Function" ||
407
+ utils.getType(threadID) === "AsyncFunction")
408
+ ) {
409
+ return threadID({ error: "Pass a threadID as a second argument." });
410
+ }
294
411
  if (!replyToMessage && utils.getType(callback) === "String") {
295
412
  replyToMessage = callback;
296
- callback = function () { };
413
+ callback = function () {};
297
414
  }
298
415
 
299
- var resolveFunc = function () { };
300
- var rejectFunc = function () { };
416
+ var resolveFunc = function () {};
417
+ var rejectFunc = function () {};
301
418
  var returnPromise = new Promise(function (resolve, reject) {
302
419
  resolveFunc = resolve;
303
420
  rejectFunc = reject;
304
421
  });
305
422
 
306
423
  if (!callback) {
307
- callback = function (err, data) {
308
- if (err) return rejectFunc(err);
309
- resolveFunc(data);
424
+ callback = function (err, friendList) {
425
+ if (err) {
426
+ return rejectFunc(err);
427
+ }
428
+ resolveFunc(friendList);
310
429
  };
311
430
  }
312
431
 
@@ -314,16 +433,46 @@ module.exports = function (defaultFuncs, api, ctx) {
314
433
  var threadIDType = utils.getType(threadID);
315
434
  var messageIDType = utils.getType(replyToMessage);
316
435
 
317
- if (msgType !== "String" && msgType !== "Object") return callback({ error: "Message should be of type string or object and not " + msgType + "." });
436
+ if (msgType !== "String" && msgType !== "Object") {
437
+ return callback({
438
+ error:
439
+ "Message should be of type string or object and not " + msgType + ".",
440
+ });
441
+ }
318
442
 
319
443
  // Changing this to accomodate an array of users
320
- if (threadIDType !== "Array" && threadIDType !== "Number" && threadIDType !== "String") return callback({ error: "ThreadID should be of type number, string, or array and not " + threadIDType + "." });
444
+ if (
445
+ threadIDType !== "Array" &&
446
+ threadIDType !== "Number" &&
447
+ threadIDType !== "String"
448
+ ) {
449
+ return callback({
450
+ error:
451
+ "ThreadID should be of type number, string, or array and not " +
452
+ threadIDType +
453
+ ".",
454
+ });
455
+ }
456
+
457
+ if (replyToMessage && messageIDType !== "String") {
458
+ return callback({
459
+ error:
460
+ "MessageID should be of type string and not " + threadIDType + ".",
461
+ });
462
+ }
321
463
 
322
- if (replyToMessage && messageIDType !== 'String') return callback({ error: "MessageID should be of type string and not " + threadIDType + "." });
464
+ if (msgType === "String") {
465
+ msg = { body: msg };
466
+ }
323
467
 
324
- if (msgType === "String") msg = { body: msg };
325
- var disallowedProperties = Object.keys(msg).filter(prop => !allowedProperties[prop]);
326
- if (disallowedProperties.length > 0) return callback({ error: "Dissallowed props: `" + disallowedProperties.join(", ") + "`" });
468
+ var disallowedProperties = Object.keys(msg).filter(
469
+ (prop) => !allowedProperties[prop]
470
+ );
471
+ if (disallowedProperties.length > 0) {
472
+ return callback({
473
+ error: "Dissallowed props: `" + disallowedProperties.join(", ") + "`",
474
+ });
475
+ }
327
476
 
328
477
  var messageAndOTID = utils.generateOfflineThreadingID();
329
478
 
@@ -346,7 +495,7 @@ module.exports = function (defaultFuncs, api, ctx) {
346
495
  is_spoof_warning: false,
347
496
  source: "source:chat:web",
348
497
  "source_tags[0]": "source:chat",
349
- body: msg.body ? msg.body.toString().replace("\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f",' ') : "",
498
+ body: msg.body ? replaceCharacters(msg.body.toString()) : "",
350
499
  html_body: false,
351
500
  ui_push_phase: "V3",
352
501
  status: "0",
@@ -357,9 +506,9 @@ module.exports = function (defaultFuncs, api, ctx) {
357
506
  manual_retry_cnt: "0",
358
507
  has_attachment: !!(msg.attachment || msg.url || msg.sticker),
359
508
  signatureID: utils.getSignatureID(),
360
- replied_to_message_id: replyToMessage
509
+ replied_to_message_id: replyToMessage,
361
510
  };
362
-
511
+
363
512
  handleLocation(msg, form, callback, () =>
364
513
  handleSticker(msg, form, callback, () =>
365
514
  handleAttachment(msg, form, callback, () =>