nodejs-insta-private-api-mqtt 1.1.2 → 1.1.4

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.
@@ -92,6 +92,8 @@ exports.FBNS = {
92
92
  exports.REALTIME = {
93
93
  HOST_NAME_V6: 'edge-mqtt.facebook.com',
94
94
  };
95
+ exports.APP_VERSION = '380.0.0.40.94';
96
+ exports.APP_VERSION_CODE = '525123456';
95
97
  // TODO: exclude in release
96
98
  /* eslint @typescript-eslint/no-unused-vars: "off" */
97
99
  exports.PossibleTopics = [
@@ -39,8 +39,6 @@ class State {
39
39
  this.platform = 'android'; // 'android' or 'ios'
40
40
  this.androidVersion = '15';
41
41
  this.androidApiLevel = '35';
42
- this.appVersion = '380.0.0.40.94';
43
- this.appVersionCode = '525123456';
44
42
  this.iosVersion = '18.1';
45
43
  this.iosAppVersion = '411.0.0';
46
44
  this.iosAppVersionCode = '700123456';
@@ -7,9 +7,20 @@ class MQTToTConnection {
7
7
  this.fbnsConnectionData = connectionData;
8
8
  }
9
9
  toThrift() {
10
- this.fbnsConnectionData.clientCapabilities = this.fbnsConnectionData.clientCapabilities || 6143;
11
- this.fbnsConnectionData.endpointCapabilities = this.fbnsConnectionData.endpointCapabilities || 255;
12
- return (0, thrift_1.thriftWriteFromObject)(this.fbnsConnectionData, MQTToTConnection.thriftConfig);
10
+ // Fix: Ensure clientInfo exists and populate it
11
+ if (!this.fbnsConnectionData.clientInfo) {
12
+ this.fbnsConnectionData.clientInfo = {};
13
+ }
14
+ this.fbnsConnectionData.clientInfo.clientCapabilities = this.fbnsConnectionData.clientInfo.clientCapabilities || this.fbnsConnectionData.clientCapabilities || 6143;
15
+ this.fbnsConnectionData.clientInfo.endpointCapabilities = this.fbnsConnectionData.clientInfo.endpointCapabilities || this.fbnsConnectionData.endpointCapabilities || 255;
16
+
17
+ // Fix: Remove root-level properties that don't have descriptors in the root thriftConfig
18
+ // to avoid "Descriptor for ... not found" errors
19
+ const dataToWrite = Object.assign({}, this.fbnsConnectionData);
20
+ delete dataToWrite.clientCapabilities;
21
+ delete dataToWrite.endpointCapabilities;
22
+
23
+ return (0, thrift_1.thriftWriteFromObject)(dataToWrite, MQTToTConnection.thriftConfig);
13
24
  }
14
25
  toString() {
15
26
  return this.toThrift().toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodejs-insta-private-api-mqtt",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Complete Instagram MQTT protocol with FULL iOS + Android support. 33 device presets (21 iOS + 12 Android). iPhone 16/15/14/13/12, iPad Pro, Samsung, Pixel, Huawei. Real-time DM messaging, view-once media extraction, sub-500ms latency.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {