toru-fca 1.0.6 → 1.0.7

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,7 +1,7 @@
1
1
  {
2
2
  "name": "toru-fca",
3
- "version": "1.0.6",
4
- "description": "toru-fca v1.0.6 — Ultimate Merged & Advanced FCA. Anti-Logout, Smooth Inbox, GoatBot Compatible, Error-Free, Full Cookie Login Protection.",
3
+ "version": "1.0.7",
4
+ "description": "toru-fca v1.0.7 — Ultimate Merged & Advanced FCA. Anti-Logout, Smooth Inbox, GoatBot Compatible, Error-Free, Full Cookie Login Protection.",
5
5
  "main": "index.js",
6
6
  "keywords": ["facebook","chat","api","messenger","bot","fca","toru-fca","goatbot","e2ee","anti-logout","cookie-login","inbox-bot"],
7
7
  "author": "toru-fca contributors",
package/src/listenMqtt.js CHANGED
@@ -760,7 +760,9 @@ function parseDelta(defaultFuncs, api, ctx, globalCallback, v) {
760
760
  case "ForcedFetch": {
761
761
  if (!v.delta.threadKey) return;
762
762
  var mid = v.delta.messageId;
763
- var tid = v.delta.threadKey.threadFbId;
763
+ // ── v1.0.6 FIX: DM/inbox e otherUserFbId থাকে, group e threadFbId থাকে ──
764
+ var tid = v.delta.threadKey.threadFbId || v.delta.threadKey.otherUserFbId;
765
+ var _isDMFetch = !v.delta.threadKey.threadFbId && !!v.delta.threadKey.otherUserFbId;
764
766
  if (mid && tid) {
765
767
  var fetchForm = {
766
768
  "av": ctx.globalOptions.pageID,
@@ -827,7 +829,7 @@ function parseDelta(defaultFuncs, api, ctx, globalCallback, v) {
827
829
  }],
828
830
  mentions: {},
829
831
  timestamp: parseInt(fetchData.timestamp_precise),
830
- isGroup: (fetchData.message_sender.id != tid.toString())
832
+ isGroup: !_isDMFetch && (fetchData.message_sender.id != tid.toString())
831
833
  });
832
834
  break;
833
835
  }