@vanzxy/baileys 1.2.5 β†’ 1.2.7

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,61 +1,175 @@
1
- # 🌿 @vanzxy/baileys
1
+ # πŸƒ @vanzxy/baileys
2
+
3
+ > Next-generation Baileys fork by **Vanzxy**.
4
+ > Built for modern WhatsApp bot development with extended interactive messages, native flow enhancements, status tools, and quality-of-life improvements.
5
+
6
+ ![Version](https://img.shields.io/npm/v/@vanzxy/baileys)
7
+ ![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen)
8
+ ![ESM](https://img.shields.io/badge/module-ESM-blue)
9
+
10
+ ---
11
+
12
+ # ✨ Why @vanzxy/baileys?
13
+
14
+ This fork focuses on:
15
+
16
+ - πŸš€ Better developer experience
17
+ - 🎯 Extended native flow support
18
+ - πŸ“’ Advanced status & broadcast features
19
+ - 🧩 More interactive message types
20
+ - ⚑ Cleaner implementation for bot developers
21
+ - πŸ”§ Extra utilities not available in standard Baileys forks
22
+
23
+ ---
24
+
25
+ # πŸ”₯ Features
26
+
27
+ ## Interactive Messages
28
+ - Native Flow
29
+ - Buttons
30
+ - Lists
31
+ - Carousel Messages
32
+ - Rich Response Messages
33
+ - CTA Buttons
34
+ - Reply Buttons
35
+ - URL Buttons
36
+ - Call Buttons
37
+ - OTP Buttons
38
+ - Authentication Buttons
39
+
40
+ ## Commerce & Business
41
+ - Catalog Message
42
+ - Order Details
43
+ - Order Status
44
+ - Review & Pay
45
+ - Payment Status
46
+ - Payment Method
47
+ - Track Order
48
+ - Reorder
49
+ - Cancel Order
50
+
51
+ ## Utility Features
52
+ - Group Status Support
53
+ - Mention All
54
+ - Lottie Sticker Support
55
+ - Newsletter Support
56
+ - ExternalAdReply Helper
57
+ - View Once Support
58
+ - Rich Formatting
59
+ - Code Highlighting
60
+
61
+ ---
62
+
63
+ # 🌟 Exclusive Vanzxy Enhancements
64
+
65
+ ### Audio Group Status Fix
66
+ Audio status uses a more compatible implementation to avoid unsupported-version errors on older WhatsApp clients.
67
+
68
+ ### Native Flow Expansion
69
+ Additional supported button types:
70
+
71
+ - cta_reminder
72
+ - cta_cancel_reminder
73
+ - address_message
74
+ - send_location
75
+ - catalog_message
76
+ - mpm
77
+ - otp_button
78
+ - authentication_button
79
+ - call_button
80
+ - url_button
81
+ - reply_button
82
+ - card_message
83
+ - order_details
84
+ - order_status
85
+ - review_and_pay
86
+ - payment_status
87
+ - payment_method
88
+ - track_order
89
+ - reorder
90
+ - cancel_order
91
+ - clear_chat
92
+ - navigateToScreen
93
+ - flow_action
94
+ - voice_call
95
+ - video_call_button
96
+
97
+ ### System Notification Filter
98
+ Messages include:
2
99
 
3
- Enhanced Baileys fork by **VanzxyπŸƒ (VanzxyPrstπŸƒ)** β€” built on top of `@itsliaaa/baileys` with extended native flow button support, system-notification filtering, and other fixes for WhatsApp bot development.
100
+ ```js
101
+ message.isSystemNotification
102
+ ```
4
103
 
5
- ## ✨ What's Different
104
+ Useful for filtering:
6
105
 
7
- ### πŸ”§ Fixes & Additions by VanzxyπŸƒ
106
+ - E2E notices
107
+ - Meta service notices
108
+ - Other system-generated messages
8
109
 
9
- - **Audio Group Status** β€” Audio in `groupStatus: true` now uses `groupStatusMessage` (v1) instead of `groupStatusMessageV2`. This fixes the black screen / *"versi WhatsApp tidak mendukung"* error on older WA versions when bots broadcast audio via `swgc`.
10
- - **No "Lihat Saluran" Button** β€” Removed `mediaAnnotation` that auto-injected newsletter context into every image/video upload, causing an unwanted *"Lihat saluran"* button to appear on all media messages.
11
- - **Extended Native Flow Buttons** β€” Added support for `cta_reminder`, `cta_cancel_reminder`, `address_message`, `send_location`, `catalog_message`, `mpm`, `otp_button`, `authentication_button`, `call_button`, `url_button`, `reply_button`, `card_message`, `order_details`, `order_status`, `review_and_pay`, `payment_status`, `payment_method`, `track_order`, `reorder`, `cancel_order`, `clear_chat`, `navigateToScreen`, `flow_action`, `voice_call`, `video_call_button` β€” fully additive, existing button types untouched.
12
- - **System Notification Filtering** β€” Messages now carry an `isSystemNotification` flag (e.g. for E2E encryption notices, "business uses Meta service" notices) so bots can easily skip them without affecting normal message handling.
110
+ ---
13
111
 
14
- ### βœ… Inherited from `@itsliaaa/baileys`
15
- - Interactive messages (buttons, list, native flow, carousel)
16
- - Album message (multi image/video)
17
- - Group Status message (`groupStatus: true`)
18
- - `mentionAll` without listing JIDs
19
- - `makeInMemoryStore` ESM port
20
- - Rich response, code blocks, tables, inline entities
21
- - Sticker pack, lottie sticker, spoiler, view once v2
22
- - Newsletter fixes, `externalAdReply` helper
23
- - `findUserId` for JID/LID lookup
24
- - `tokenizeCode` for syntax highlighting
112
+ # πŸ“¦ Installation
25
113
 
26
- ### βœ… Inherited from `@whiskeysockets/baileys`
27
- - LID/PN session management & mapping
28
- - Reachout timelock handling
29
- - New chat message cap
30
- - `validateSession` checks
31
- - `fetchNewChatMessageCap`, `fetchAccountReachoutTimelock`
114
+ ```bash
115
+ npm install @vanzxy/baileys
116
+ ```
32
117
 
33
- ## πŸ“₯ Installation
118
+ GitHub:
34
119
 
35
120
  ```bash
36
- # Via npm
37
- npm i @vanzxy/baileys
38
-
39
- # Via GitHub
40
- npm i github:vanzxy/baileys
121
+ npm install github:vanzxy/baileys
41
122
  ```
42
123
 
43
- ## 🧩 Import
124
+ ---
125
+
126
+ # πŸš€ Quick Start
44
127
 
45
128
  ```js
46
- // ESM
47
129
  import { makeWASocket } from '@vanzxy/baileys'
130
+
131
+ const sock = makeWASocket({
132
+ printQRInTerminal: true
133
+ })
48
134
  ```
49
135
 
50
- ## πŸ“¦ Fork Base
136
+ ---
137
+
138
+ # πŸ›  Recommended Environment
139
+
140
+ - Node.js 18+
141
+ - ESM Project
142
+ - Latest WhatsApp Multi Device
143
+
144
+ ---
145
+
146
+ # πŸ“š Fork Lineage
147
+
148
+ @vanzxy/baileys
149
+ └── @itsliaaa/baileys
150
+ └── WhiskeySockets/Baileys
151
+
152
+ Respect to all original maintainers and contributors.
153
+
154
+ ---
155
+
156
+ # πŸ‘‘ Maintainer
157
+
158
+ **Vanzxy**
159
+
160
+ GitHub:
161
+ https://github.com/vanzxy
162
+
163
+ Package:
164
+ @vanzxy/baileys
165
+
166
+ ---
51
167
 
52
- - [`@itsliaaa/baileys`](https://github.com/itsliaaa/baileys)
53
- - [`@whiskeysockets/baileys`](https://github.com/WhiskeySockets/Baileys)
168
+ # ⚠️ Disclaimer
54
169
 
55
- ## πŸ“£ Credits
170
+ This project is an independent fork.
171
+ Use responsibly and follow WhatsApp Terms of Service.
56
172
 
57
- Full credit to original maintainers:
58
- - [purpshell](https://github.com/purpshell), [jlucaso1](https://github.com/jlucaso1), [adiwajshing](https://github.com/adiwajshing) β€” WhiskeySockets/Baileys
59
- - [Lia Wynn (itsliaaa)](https://github.com/itsliaaa) β€” @itsliaaa/baileys
173
+ ---
60
174
 
61
- Fixes & fork by **VanzxyπŸƒ (VanzxyPrstπŸƒ)** β€” [github.com/vanzxy](https://github.com/vanzxy)
175
+ Made with πŸƒ by Vanzxy
@@ -8,8 +8,8 @@ export const BIZ_BOT_SUPPORT_PAYLOAD = '{"version":1,"is_ai_message":true,"shoul
8
8
  export const DEFAULT_ORIGIN = 'https://web.whatsapp.com';
9
9
  export const CALL_VIDEO_PREFIX = 'https://call.whatsapp.com/video/';
10
10
  export const CALL_AUDIO_PREFIX = 'https://call.whatsapp.com/voice/';
11
- export const DONATE_URL = 'https://saweria.co/itsliaaa'; // Lia@Note 02-02-26 --- Apologies if this feels cheeky, just a fallback
12
- export const LIBRARY_NAME = 'itsliaaa/baileys';
11
+ export const DONATE_URL = ''; // Vanz@Fix: cleared itsliaaa's donate URL fallback
12
+ export const LIBRARY_NAME = 'vanzxy/baileys';
13
13
  export const DEF_CALLBACK_PREFIX = 'CB:';
14
14
  export const DEF_TAG_PREFIX = 'TAG:';
15
15
  export const PHONE_CONNECTION_CB = 'CB:Pong';
@@ -70,8 +70,12 @@ export const DEFAULT_CONNECTION_CONFIG = {
70
70
  return syncType !== proto.HistorySync.HistorySyncType.FULL;
71
71
  },
72
72
  shouldIgnoreJid: () => false,
73
- linkPreviewImageThumbnailWidth: 192,
73
+ linkPreviewImageThumbnailWidth: 480, // Vanz@Fix: was 192 β€” too small, bumped to 480
74
74
  transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 3000 },
75
+ eventBufferTimeoutMs: 30000, // Vanz@Fix (bug 25): configurable β€” increase if bot is heavy load
76
+ statusBroadcastDelayMs: 1500, // Vanz@Fix (bug 5): configurable delay between status broadcasts β€” default 1500ms
77
+ albumDelayMs: 1500, // Vanz@Fix (bug 5): configurable delay between album message sends β€” default 1500ms
78
+ phashRetryEnabled: false, // Vanz@Fix (bug 54/55): enable phash retry on ack (caution: can cause loops if not careful)
75
79
  generateHighQualityLinkPreview: true,
76
80
  enableAutoSessionRecreation: true,
77
81
  enableRecentMessageCache: true,
@@ -81,6 +85,9 @@ export const DEFAULT_CONNECTION_CONFIG = {
81
85
  snapshot: false
82
86
  },
83
87
  countryCode: 'US',
88
+ // Vanz@Fix (bug 15): default returns undefined β€” every retry request will fail unless overridden.
89
+ // Override this in your makeWASocket config to return messages from your store:
90
+ // getMessage: async (key) => store.loadMessage(key.remoteJid, key.id)?.message
84
91
  getMessage: async () => undefined,
85
92
  cachedGroupMetadata: async () => undefined,
86
93
  makeSignalRepository: makeLibSignalRepository