@gamastudio/sendwave-provider 0.0.12 → 0.0.14

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,6 @@
1
1
  {
2
2
  "name": "@gamastudio/sendwave-provider",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Librería para interactuar con Sendwave usando configuración dinámica.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -79,14 +79,6 @@ export declare class SendWaveProvider extends ProviderClass<SendWaveCore> {
79
79
  * Check if user is ignored by queue flow system
80
80
  */
81
81
  isUserIgnored(from: string): boolean;
82
- /**
83
- * Get queue flow statistics
84
- */
85
- getQueueFlowStats(): {
86
- activeTimeouts: number;
87
- ignoredUsers: number;
88
- config: Required<import("../utils/queueFlow").QueueFlowConfig>;
89
- };
90
82
  /**
91
83
  * Listen to queue flow events
92
84
  */
@@ -123,14 +123,6 @@ class SendWaveProvider extends bot_1.ProviderClass {
123
123
  port: this.globalVendorArgs.port,
124
124
  uptime: process.uptime()
125
125
  }));
126
- })
127
- .get("/metrics", async (_, res) => {
128
- res.setHeader('Content-Type', 'application/json');
129
- res.end(JSON.stringify({
130
- queue: this.queueOptions,
131
- queueFlow: this.getQueueFlowStats(),
132
- rateLimit: this.rateLimitConfig
133
- }));
134
126
  })
135
127
  .post("/webhook", this.vendor.incomingMsg);
136
128
  };
@@ -549,12 +541,6 @@ class SendWaveProvider extends bot_1.ProviderClass {
549
541
  return false;
550
542
  return queueFlow_1.queueFlow.isUserIgnored(from);
551
543
  }
552
- /**
553
- * Get queue flow statistics
554
- */
555
- getQueueFlowStats() {
556
- return queueFlow_1.queueFlow.getUserStats();
557
- }
558
544
  /**
559
545
  * Listen to queue flow events
560
546
  */
@@ -13,7 +13,7 @@ function parseIncomingMsg(payload) {
13
13
  }
14
14
  // if (msg.key.fromMe) return null
15
15
  const fromMe = msg.key.fromMe;
16
- const from = (_a = msg.key) === null || _a === void 0 ? void 0 : _a.remoteJid.split("@")[0];
16
+ const from = (((_a = msg.key) === null || _a === void 0 ? void 0 : _a.remoteJid) || "").split("@")[0].split(":")[0];
17
17
  const to = payload.instance || "";
18
18
  const name = msg.pushName;
19
19
  const messageContent = msg.message || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamastudio/sendwave-provider",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Librería para interactuar con Sendwave usando configuración dinámica.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",