@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
package/package.json
CHANGED
@@ -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:
|
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=${
|
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=${
|
38
|
+
else host = `wss://edge-chat.facebook.com/chat?sid=${sessionID}&cid=${ctx.clientId}`;
|
40
39
|
|
41
40
|
const options = {
|
42
41
|
clientId: "mqttwsclient",
|