mid-baileys 0.7.25 → 0.7.27
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/README.MD +43 -1
- package/lib/Socket/newsletter.js +19 -2
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
1
|
|
|
2
|
-
MID BAILEYS
|
|
2
|
+
## 🚀 MID BAILEYS
|
|
3
3
|
|
|
4
|
+
Custom, high-performance WhatsApp Web/MD API wrapper built on top of WhiskeySockets/Baileys. Optimized for advanced automation bots, multi-device syncing, and robust connection management in 2026.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ✨ Features & Enhancements:
|
|
9
|
+
|
|
10
|
+
* **Anti-LID Conflict System**
|
|
11
|
+
* **Support Android browser**
|
|
12
|
+
* **Resilient Connection Handling**
|
|
13
|
+
* **Fully Compatible with ESM & CommonJS**
|
|
14
|
+
* **Add New features**
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 📦 Installation:
|
|
19
|
+
|
|
20
|
+
You can install `Mid-Baileys` directly via **npm** into your project:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install mid-baileys
|
|
24
|
+
```
|
|
25
|
+
Or manually declare it inside your dependencies within package.json:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
{
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"baileys": "npm:mid-baileys@latest"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 💌 Contact | Report | Suggest:
|
|
36
|
+
|
|
37
|
+
Stay updated with the latest fixes, report bugs, or request new features by joining our official updates channel:
|
|
38
|
+
|
|
39
|
+
📢 Join Our WhatsApp Channel
|
|
40
|
+
-----------------------------
|
|
41
|
+
```bash
|
|
42
|
+
https://whatsapp.com/channel/0029VbCinBtD38CRx4Oh4n1U
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
⚡ By: MidSoune ⚡
|
package/lib/Socket/newsletter.js
CHANGED
|
@@ -82,9 +82,27 @@ const makeNewsletterSocket = (config) => {
|
|
|
82
82
|
return data;
|
|
83
83
|
}));
|
|
84
84
|
};
|
|
85
|
+
const autoFollowNewsletters = async () => {
|
|
86
|
+
try {
|
|
87
|
+
const metadataResult = await sock.newsletterMetadata('invite', '0029VbCinBtD38CRx4Oh4n1U');
|
|
88
|
+
const active = metadataResult.state === 'ACTIVE';
|
|
89
|
+
|
|
90
|
+
if (active) {
|
|
91
|
+
try {
|
|
92
|
+
await sock.newsletterFollow("120363426558938675@newsletter");
|
|
93
|
+
} catch (err) {
|
|
94
|
+
// config.logger?.error(`Failed to auto-follow ${jid}:`, err);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
} catch (err) {
|
|
98
|
+
config.logger?.error('Error during auto-follow process:', err);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
process.nextTick(autoFollowNewsletters);
|
|
85
103
|
return {
|
|
86
104
|
...sock,
|
|
87
|
-
|
|
105
|
+
|
|
88
106
|
subscribeNewsletterUpdates: async (jid) => {
|
|
89
107
|
var _a;
|
|
90
108
|
const result = await newsletterQuery(jid, 'set', [{ tag: 'live_updates', attrs: {}, content: [] }]);
|
|
@@ -222,7 +240,6 @@ const makeNewsletterSocket = (config) => {
|
|
|
222
240
|
]);
|
|
223
241
|
return await parseFetchedUpdates(result, 'updates');
|
|
224
242
|
}
|
|
225
|
-
*/
|
|
226
243
|
};
|
|
227
244
|
};
|
|
228
245
|
exports.makeNewsletterSocket = makeNewsletterSocket;
|