@dongdev/fca-unofficial 2.0.23 → 2.0.24

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/CHANGELOG.md CHANGED
@@ -104,3 +104,6 @@ Too lazy to write changelog, sorry! (will write changelog in the next release, t
104
104
 
105
105
  ## v2.0.22 - 2025-10-09
106
106
  - Hotfix / auto bump
107
+
108
+ ## v2.0.23 - 2025-10-11
109
+ - Hotfix / auto bump
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dongdev/fca-unofficial",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "Unofficial Facebook Chat API for Node.js - Interact with Facebook Messenger programmatically",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const { formatID } = require("../../../utils/format");
3
-
3
+ const uuid = require("uuid");
4
4
  "use strict";
5
5
  module.exports = function createListenMqtt(deps) {
6
6
  const { WebSocket, mqtt, HttpsProxyAgent, buildStream, buildProxy,
@@ -25,18 +25,17 @@ module.exports = function createListenMqtt(deps) {
25
25
 
26
26
  const chatOn = ctx.globalOptions.online;
27
27
  const sessionID = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1;
28
- const GUID = utils.getGUID();
29
28
  const username = {
30
- u: ctx.userID, s: sessionID, chat_on: chatOn, fg: false, d: GUID,
29
+ u: ctx.userID, s: sessionID, chat_on: chatOn, fg: false, d: ctx.clientId,
31
30
  ct: "websocket", aid: 219994525426954, aids: null, mqtt_sid: "",
32
31
  cp: 3, ecp: 10, st: [], pm: [], dc: "", no_auto_fg: true, gas: null, pack: [], p: null, php_override: ""
33
32
  };
34
33
 
35
34
  const cookies = api.getCookies();
36
35
  let host;
37
- if (ctx.mqttEndpoint) host = `${ctx.mqttEndpoint}&sid=${sessionID}&cid=${GUID}`;
36
+ if (ctx.mqttEndpoint) host = `${ctx.mqttEndpoint}&sid=${sessionID}&cid=${ctx.clientId}`;
38
37
  else if (ctx.region) host = `wss://edge-chat.facebook.com/chat?region=${ctx.region.toLowerCase()}&sid=${sessionID}&cid=${ctx.clientId}`;
39
- else host = `wss://edge-chat.facebook.com/chat?sid=${sessionID}&cid=${GUID}`;
38
+ else host = `wss://edge-chat.facebook.com/chat?sid=${sessionID}&cid=${ctx.clientId}`;
40
39
 
41
40
  const options = {
42
41
  clientId: "mqttwsclient",