stfca 1.0.21 → 1.0.22

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stfca",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Unofficial Facebook Chat API for Node.js with Auto-Update System - Enhanced by ST | Sheikh Tamim",
5
5
  "main": "index.js",
6
6
  "files": [
package/src/OldMessage.js CHANGED
@@ -312,10 +312,10 @@ module.exports = function (defaultFuncs, api, ctx) {
312
312
  // console.log(form)
313
313
 
314
314
  if (isSingleUser && ctx.config.enableTypingIndicator) {
315
- const stopTyping = api.sendTypingIndicator(threadID, () => {}, false);
315
+ api.sendTypingIndicatorV2(true, threadID, () => {});
316
316
  const originalCallback = callback;
317
317
  callback = (err, data) => {
318
- stopTyping(() => {});
318
+ api.sendTypingIndicatorV2(false, threadID, () => {});
319
319
  originalCallback(err, data);
320
320
  };
321
321
  setTimeout(() => {
@@ -235,10 +235,10 @@ module.exports = (defaultFuncs, api, ctx) => {
235
235
  }
236
236
  }
237
237
  if (isSingleUser && ctx.config.enableTypingIndicator) {
238
- const stopTyping = api.sendTypingIndicator(threadID, () => {}, false);
238
+ await api.sendTypingIndicatorV2(true, threadID, () => {});
239
239
  await utils.delay(ctx.config.typingDuration);
240
240
  const result = await sendContent(form, threadID, isSingleUser, messageAndOTID);
241
- stopTyping(() => {});
241
+ await api.sendTypingIndicatorV2(false, threadID, () => {});
242
242
  if (callback && typeof callback === "function") {
243
243
  callback(null, result);
244
244
  }