nodejs-insta-private-api-mqtt 1.3.27 → 1.3.28

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.
@@ -1,6 +1,9 @@
1
1
  'use strict';
2
+ // Instagram version: 412.0.0.35.87
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.mqttotConnectFlow = exports.MQTToTClient = void 0;
5
+ // Export the Instagram version so it can be used programmatically
6
+ exports.INSTAGRAM_VERSION = '412.0.0.35.87';
4
7
  const shared_1 = require("../shared");
5
8
  const mqttot_connect_request_packet_1 = require("./mqttot.connect.request.packet");
6
9
  // *** Change: import the external mqtts package instead of a local mqtt-shim ***
@@ -145,4 +148,3 @@ function mqttotConnectFlow(payload, requirePayload) {
145
148
  });
146
149
  }
147
150
  exports.mqttotConnectFlow = mqttotConnectFlow;
148
-
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.readConnectResponsePacket = exports.MQTToTConnectResponsePacket = void 0;
4
- const mqtts_1 = require("../mqtt-shim");
4
+ const mqtts_1 = require("mqtts");
5
5
  class MQTToTConnectResponsePacket extends mqtts_1.ConnectResponsePacket {
6
6
  constructor(ackFlags, returnCode, payload) {
7
7
  super(ackFlags, returnCode);
@@ -21,4 +21,4 @@ function readConnectResponsePacket(stream, remaining) {
21
21
  return new MQTToTConnectResponsePacket(ack, returnCode, remaining > 2 ? stream.readStringAsBuffer() : Buffer.alloc(0));
22
22
  }
23
23
  exports.readConnectResponsePacket = readConnectResponsePacket;
24
- //# sourceMappingURL=mqttot.connect.response.packet.js.map
24
+ //# sourceMappingURL=mqttot.connect.response.packet.js.map
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MessageSyncMixin = void 0;
4
4
  const mixin_1 = require("./mixin");
5
5
  const constants_1 = require("../../constants");
6
- const shared_1 = require("../../shared");
7
- const mqtts_1 = require("../../mqtt-shim");
6
+ const shared_1 = require("../../shared")
7
+ const mqtts_1 = require("mqtts");
8
8
 
9
9
  /**
10
10
  * MessageSyncMixin - patched for 2026 (robust parsing + safe username fetch + tolerant timestamp handling)
@@ -4,7 +4,7 @@ exports.RealtimeSubMixin = void 0;
4
4
  const mixin_1 = require("./mixin");
5
5
  const constants_1 = require("../../constants");
6
6
  const shared_1 = require("../../shared");
7
- const mqtts_1 = require("../../mqtt-shim");
7
+ const mqtts_1 = require("mqtts");
8
8
  class RealtimeSubMixin extends mixin_1.Mixin {
9
9
  apply(client) {
10
10
  (0, mixin_1.hook)(client, 'connect', {
@@ -32,6 +32,9 @@ const gap_handler_1 = require("./features/gap-handler");
32
32
  const enhanced_direct_commands_1 = require("./commands/enhanced.direct.commands");
33
33
  const presence_typing_mixin_1 = require("./mixins/presence-typing.mixin");
34
34
 
35
+ // Use INSTAGRAM_VERSION exported from mqttot so it is applied automatically
36
+ const INSTAGRAM_VERSION = mqttot_1.INSTAGRAM_VERSION;
37
+
35
38
  /**
36
39
  * RealtimeClient
37
40
  * - Extends EventEmitter to emit high-level events for consumers.
@@ -432,7 +435,8 @@ class RealtimeClient extends eventemitter3_1.EventEmitter {
432
435
  },
433
436
  password,
434
437
  appSpecificInfo: {
435
- app_version: this.ig.state.appVersion,
438
+ // Use exported INSTAGRAM_VERSION automatically, fallback to this.ig.state.appVersion if missing
439
+ app_version: INSTAGRAM_VERSION || this.ig.state.appVersion,
436
440
  'X-IG-Capabilities': this.ig.state.capabilitiesHeader,
437
441
  everclear_subscriptions: JSON.stringify({
438
442
  inapp_notification_subscribe_comment: '17899377895239777',
@@ -915,4 +919,3 @@ class RealtimeClient extends eventemitter3_1.EventEmitter {
915
919
  }
916
920
  }
917
921
  exports.RealtimeClient = RealtimeClient;
918
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodejs-insta-private-api-mqtt",
3
- "version": "1.3.27",
3
+ "version": "1.3.28",
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": {