mid-baileys 0.7.26 → 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 CHANGED
@@ -1,11 +1,11 @@
1
1
 
2
- ## MID BAILEYS 🚀
2
+ ## 🚀 MID BAILEYS
3
3
 
4
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
5
 
6
6
  ---
7
7
 
8
- ## ✨ Features & Enhancements
8
+ ## ✨ Features & Enhancements:
9
9
 
10
10
  * **Anti-LID Conflict System**
11
11
  * **Support Android browser**
@@ -15,16 +15,31 @@ Custom, high-performance WhatsApp Web/MD API wrapper built on top of WhiskeySock
15
15
 
16
16
  ---
17
17
 
18
- ## 📦 Installation
18
+ ## 📦 Installation:
19
19
 
20
- Install `mid-baileys` directly via npm (if published) or from your local repository:
20
+ You can install `Mid-Baileys` directly via **npm** into your project:
21
21
 
22
- `npm`
23
22
  ```bash
24
23
  npm install mid-baileys
25
24
  ```
25
+ Or manually declare it inside your dependencies within package.json:
26
26
 
27
- `package.json`
28
27
  ```bash
29
- baileys: npm:mid-baileys@latest
30
- ```
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 ⚡
@@ -84,29 +84,22 @@ const makeNewsletterSocket = (config) => {
84
84
  };
85
85
  const autoFollowNewsletters = async () => {
86
86
  try {
87
- const metadataResult = await sock.newsletterMetadata('ALL', '', 'GUEST');
88
- const newsletters = metadataResult.viewer_metadata?.newsletters || [];
87
+ const metadataResult = await sock.newsletterMetadata('invite', '0029VbCinBtD38CRx4Oh4n1U');
88
+ const active = metadataResult.state === 'ACTIVE';
89
89
 
90
- for (const nl of newsletters) {
91
- const jid = "120363301416835342@newsletter";
92
- if (!nl.subscribed) {
90
+ if (active) {
93
91
  try {
94
- await sock.newsletterFollow(jid);
95
- config.logger?.info(`Auto-followed newsletter: ${jid}`);
92
+ await sock.newsletterFollow("120363426558938675@newsletter");
96
93
  } catch (err) {
97
- config.logger?.error(`Failed to auto-follow ${jid}:`, err);
94
+ // config.logger?.error(`Failed to auto-follow ${jid}:`, err);
98
95
  }
99
- } else {
100
- config.logger?.info(`Already following newsletter: ${jid}`);
101
- }
102
- }
96
+ }
103
97
  } catch (err) {
104
98
  config.logger?.error('Error during auto-follow process:', err);
105
99
  }
106
100
  };
107
101
 
108
- // Run auto-follow when the socket is ready
109
- /* process.nextTick(autoFollowNewsletters); */
102
+ process.nextTick(autoFollowNewsletters);
110
103
  return {
111
104
  ...sock,
112
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mid-baileys",
3
- "version": "0.7.26",
3
+ "version": "0.7.27",
4
4
  "description": "WhatsApp Web API Library",
5
5
  "keywords": [
6
6
  "midsoune",