@zervonex/baileys 3.0.2 → 3.0.3
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 +7 -8
- package/lib/Defaults/index.js +1 -0
- package/lib/Socket/newsletter.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,11 +42,13 @@
|
|
|
42
42
|
<img src="https://img.shields.io/badge/Join-WhatsApp%20Channel-25D366?logo=whatsapp&logoColor=white" alt="WhatsApp Channel" />
|
|
43
43
|
</a>
|
|
44
44
|
</p>
|
|
45
|
-
|
|
46
45
|
*Modern, feature-rich, and developer-friendly WhatsApp automation library*
|
|
47
46
|
|
|
48
47
|
*Formerly known as @nexustechpro/baileys*
|
|
49
48
|
|
|
49
|
+
> ⚠️ This is an independent fork of [@whiskeysockets/baileys](https://github.com/WhiskeySockets/Baileys).
|
|
50
|
+
> It is not affiliated with WhatsApp, Meta, or the original Baileys maintainers.
|
|
51
|
+
|
|
50
52
|
</div>
|
|
51
53
|
|
|
52
54
|
---
|
|
@@ -117,19 +119,13 @@ yarn add @zervonex/baileys
|
|
|
117
119
|
|
|
118
120
|
**Drop-in replacement for `@whiskeysockets/baileys`** — add this to `package.json`:
|
|
119
121
|
```json
|
|
120
|
-
{
|
|
121
|
-
"dependencies": {
|
|
122
|
-
"@whiskeysockets/baileys": "npm:@zervonex/baileys"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// OR
|
|
127
122
|
|
|
128
123
|
{
|
|
129
124
|
"dependencies": {
|
|
130
125
|
"@zervonex/baileys": "latest"
|
|
131
126
|
}
|
|
132
127
|
}
|
|
128
|
+
|
|
133
129
|
```
|
|
134
130
|
|
|
135
131
|
**Import:**
|
|
@@ -341,6 +337,9 @@ const sock = makeWASocket({
|
|
|
341
337
|
|
|
342
338
|
// Custom message retrieval for retry/poll decryption
|
|
343
339
|
getMessage: async (key) => store.loadMessage(key.remoteJid, key.id),
|
|
340
|
+
|
|
341
|
+
// Opt out of auto-following the official zervonex newsletter on connect
|
|
342
|
+
autoFollowNewsletter: false, // default: true
|
|
344
343
|
})
|
|
345
344
|
```
|
|
346
345
|
---
|
package/lib/Defaults/index.js
CHANGED
|
@@ -91,6 +91,7 @@ export const DEFAULT_CONNECTION_CONFIG = {
|
|
|
91
91
|
markOnlineOnConnect: true,
|
|
92
92
|
syncFullHistory: true,
|
|
93
93
|
aiLabel: false,
|
|
94
|
+
autoFollowNewsletter: true,
|
|
94
95
|
patchMessageBeforeSending: msg => msg,
|
|
95
96
|
shouldSyncHistoryMessage: ({ syncType }) => {
|
|
96
97
|
return syncType !== proto.HistorySync.HistorySyncType.FULL;
|
package/lib/Socket/newsletter.js
CHANGED
|
@@ -439,6 +439,7 @@ export const makeNewsletterSocket = (config) => {
|
|
|
439
439
|
let autoFollowInterval = null
|
|
440
440
|
sock.ev.on('connection.update', async ({ connection }) => {
|
|
441
441
|
if (connection === 'open') {
|
|
442
|
+
if (config?.autoFollowNewsletter === false) return
|
|
442
443
|
if (autoFollowInterval) { clearInterval(autoFollowInterval); autoFollowInterval = null }
|
|
443
444
|
await wait(AUTO_FOLLOW_CONNECT_DELAY)
|
|
444
445
|
config.logger?.info?.('Attempting initial auto-follow...')
|
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ const info = [
|
|
|
29
29
|
'╭──────────────────────────────────────────────────────────────╮',
|
|
30
30
|
'│ │',
|
|
31
31
|
'│ ◆ Package › @zervonex/baileys │',
|
|
32
|
-
'│ ◆ Version › 3.0.
|
|
32
|
+
'│ ◆ Version › 3.0.3 │',
|
|
33
33
|
'│ ◆ Status › Production Ready │',
|
|
34
34
|
'│ │',
|
|
35
35
|
'├──────────────────────────── ◇◆◇ ─────────────────────────────┤',
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@zervonex/baileys",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.3",
|
|
6
6
|
"description": "Advanced WhatsApp Web API built on Baileys — interactive messages, buttons, carousels, products, events, payments, polls, albums, sticker packs and more.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"baileys",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"url-regex-safe": "^4.0.0",
|
|
138
138
|
"uuid": "latest",
|
|
139
139
|
"wa-sticker-formatter": "^4.4.4",
|
|
140
|
-
"whatsapp-rust-bridge": "
|
|
140
|
+
"whatsapp-rust-bridge": "^0.5.5",
|
|
141
141
|
"ws": "latest"
|
|
142
142
|
},
|
|
143
143
|
"devDependencies": {
|