@vanzxy/baileys 1.6.4 → 1.6.6
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 +212 -48
- package/WAProto/CHANGELOG-proto-upgrade.md +111 -0
- package/WAProto/index.js +773 -0
- package/lib/Defaults/index.d.ts +5 -0
- package/lib/Defaults/index.js +21 -4
- package/lib/Utils/A2UI.js +63 -3
- package/lib/Utils/anti-delete.d.ts +6 -0
- package/lib/Utils/anti-delete.js +29 -0
- package/lib/Utils/auth-utils.js +11 -6
- package/lib/Utils/auto-reply.js +4 -1
- package/lib/Utils/baileys-event-stream.d.ts +8 -0
- package/lib/Utils/baileys-event-stream.js +62 -0
- package/lib/Utils/business.js +8 -0
- package/lib/Utils/button-sender.js +8 -1
- package/lib/Utils/chat-control.d.ts +159 -0
- package/lib/Utils/chat-control.js +232 -0
- package/lib/Utils/generics.d.ts +6 -0
- package/lib/Utils/generics.js +24 -0
- package/lib/Utils/index.d.ts +4 -0
- package/lib/Utils/index.js +4 -0
- package/lib/Utils/media-set.js +4 -1
- package/lib/Utils/message-search.js +20 -5
- package/lib/Utils/messages.js +5 -0
- package/lib/Utils/past-participants.d.ts +14 -0
- package/lib/Utils/past-participants.js +40 -0
- package/lib/Utils/process-message.js +6 -2
- package/lib/Utils/stickerpack.js +10 -11
- package/lib/Utils/use-cache-manager-auth-state.d.ts +13 -0
- package/lib/Utils/use-cache-manager-auth-state.js +82 -0
- package/lib/Utils/validate-connection.js +2 -6
- package/lib/Utils/vcard.js +15 -4
- package/package.json +7 -7
- package/postinstall-banner.js +37 -5
- package/NOTICE.md +0 -91
package/README.md
CHANGED
|
@@ -1,43 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center" id="top">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> Built for modern WhatsApp bot development with extended interactive messages, native flow enhancements, status tools, and quality-of-life improvements.
|
|
3
|
+
# 🍃 @vanzxy/baileys
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
### *"Next-generation Baileys fork — built different, built by Vanzxy."*
|
|
6
|
+
|
|
7
|
+
Extended interactive messages • native flow enhancements • status tools • quality-of-life fixes — built on top of WhiskeySockets/Baileys.
|
|
8
|
+
|
|
9
|
+
<p>
|
|
10
|
+
<a href="https://www.npmjs.com/package/@vanzxy/baileys" target="_blank"><img src="https://img.shields.io/npm/v/@vanzxy/baileys?color=2ecc71&label=npm&style=for-the-badge" alt="npm version"/></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/@vanzxy/baileys" target="_blank"><img src="https://img.shields.io/npm/dt/@vanzxy/baileys?color=3498db&style=for-the-badge" alt="npm downloads"/></a>
|
|
12
|
+
<a href="https://github.com/vanzxysenpai/vanzxybaileys/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/vanzxysenpai/vanzxybaileys?color=f1c40f&style=for-the-badge" alt="GitHub stars"/></a>
|
|
13
|
+
<a href="https://github.com/vanzxysenpai/vanzxybaileys/issues" target="_blank"><img src="https://img.shields.io/github/issues/vanzxysenpai/vanzxybaileys?color=e74c3c&style=for-the-badge" alt="GitHub issues"/></a>
|
|
14
|
+
</p>
|
|
15
|
+
<p>
|
|
16
|
+
<img src="https://img.shields.io/github/last-commit/vanzxysenpai/vanzxybaileys?color=9b59b6&style=flat-square" alt="Last commit"/>
|
|
17
|
+
<img src="https://img.shields.io/github/commit-activity/m/vanzxysenpai/vanzxybaileys?color=1abc9c&style=flat-square" alt="Commit activity"/>
|
|
18
|
+
<img src="https://img.shields.io/github/languages/code-size/vanzxysenpai/vanzxybaileys?color=e67e22&style=flat-square" alt="Code size"/>
|
|
19
|
+
<img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen?style=flat-square" alt="Node >=20"/>
|
|
20
|
+
<img src="https://img.shields.io/badge/module-ESM-blue?style=flat-square" alt="ESM"/>
|
|
21
|
+
<img src="https://img.shields.io/badge/license-see%20NOTICE-lightgrey?style=flat-square" alt="License"/>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
<p>
|
|
25
|
+
<a href="#-why-vanzxybaileys">About</a>  | 
|
|
26
|
+
<a href="#-built-with">Tech Stack</a>  | 
|
|
27
|
+
<a href="#-features">Features</a>  | 
|
|
28
|
+
<a href="#-exclusive-vanzxy-enhancements">Enhancements</a>  | 
|
|
29
|
+
<a href="#-installation">Installation</a>  | 
|
|
30
|
+
<a href="#-usage-examples">Examples</a>  | 
|
|
31
|
+
<a href="#-fork-lineage">Fork Lineage</a>  | 
|
|
32
|
+
<a href="#-credits">Credits</a>  | 
|
|
33
|
+
<a href="#-maintainer">Maintainer</a>
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
</div>
|
|
9
37
|
|
|
10
38
|
---
|
|
11
39
|
|
|
12
|
-
|
|
40
|
+
## ✨ Why @vanzxy/baileys?
|
|
13
41
|
|
|
14
42
|
This fork focuses on:
|
|
15
43
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
44
|
+
| | |
|
|
45
|
+
|---|---|
|
|
46
|
+
| 🚀 | Better developer experience |
|
|
47
|
+
| 🎯 | Extended native flow support |
|
|
48
|
+
| 📢 | Advanced status & broadcast features |
|
|
49
|
+
| 🧩 | More interactive message types |
|
|
50
|
+
| ⚡ | Cleaner implementation for bot developers |
|
|
51
|
+
| 🔧 | Extra utilities not available in standard Baileys forks |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🧰 Built With
|
|
56
|
+
|
|
57
|
+
<p>
|
|
58
|
+
<img src="https://img.shields.io/badge/node.js-%2343853D.svg?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js"/>
|
|
59
|
+
<img src="https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E" alt="JavaScript"/>
|
|
60
|
+
<img src="https://img.shields.io/badge/esm-%23F7DF1E.svg?style=for-the-badge&logo=javascript&logoColor=black" alt="ESM"/>
|
|
61
|
+
<img src="https://img.shields.io/badge/websocket-%23000000.svg?style=for-the-badge&logo=socket.io&logoColor=white" alt="WebSocket"/>
|
|
62
|
+
<img src="https://img.shields.io/badge/signal%20protocol-%233A76F0.svg?style=for-the-badge&logo=signal&logoColor=white" alt="Signal Protocol"/>
|
|
63
|
+
<img src="https://img.shields.io/badge/protobuf-%23345?style=for-the-badge&logo=google&logoColor=white" alt="Protobuf"/>
|
|
64
|
+
<img src="https://img.shields.io/badge/npm-%23CB3837.svg?style=for-the-badge&logo=npm&logoColor=white" alt="npm"/>
|
|
65
|
+
</p>
|
|
22
66
|
|
|
23
67
|
---
|
|
24
68
|
|
|
25
|
-
|
|
69
|
+
## 🔥 Features
|
|
70
|
+
|
|
71
|
+
<table>
|
|
72
|
+
<tr>
|
|
73
|
+
<th align="center">💬 Interactive Messages</th>
|
|
74
|
+
<th align="center">🛒 Commerce & Business</th>
|
|
75
|
+
<th align="center">🧩 Utility Features</th>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td valign="top">
|
|
26
79
|
|
|
27
|
-
## Interactive Messages
|
|
28
80
|
- Native Flow
|
|
29
81
|
- Buttons
|
|
30
82
|
- Lists
|
|
31
83
|
- Carousel Messages
|
|
32
84
|
- Rich Response Messages
|
|
33
|
-
- CTA Buttons
|
|
34
|
-
- Reply Buttons
|
|
35
|
-
- URL Buttons
|
|
85
|
+
- CTA / Reply / URL Buttons
|
|
36
86
|
- Call Buttons
|
|
37
87
|
- OTP Buttons
|
|
38
88
|
- Authentication Buttons
|
|
39
89
|
|
|
40
|
-
|
|
90
|
+
</td>
|
|
91
|
+
<td valign="top">
|
|
92
|
+
|
|
41
93
|
- Catalog Message
|
|
42
94
|
- Order Details
|
|
43
95
|
- Order Status
|
|
@@ -48,7 +100,9 @@ This fork focuses on:
|
|
|
48
100
|
- Reorder
|
|
49
101
|
- Cancel Order
|
|
50
102
|
|
|
51
|
-
|
|
103
|
+
</td>
|
|
104
|
+
<td valign="top">
|
|
105
|
+
|
|
52
106
|
- Group Status Support
|
|
53
107
|
- Mention All
|
|
54
108
|
- Lottie Sticker Support
|
|
@@ -58,43 +112,66 @@ This fork focuses on:
|
|
|
58
112
|
- Rich Formatting
|
|
59
113
|
- Code Highlighting
|
|
60
114
|
|
|
115
|
+
</td>
|
|
116
|
+
</tr>
|
|
117
|
+
</table>
|
|
118
|
+
|
|
61
119
|
---
|
|
62
120
|
|
|
63
|
-
|
|
121
|
+
## 🌟 Exclusive Vanzxy Enhancements
|
|
64
122
|
|
|
65
123
|
### Audio Group Status Fix
|
|
66
124
|
Audio status uses a more compatible implementation to avoid unsupported-version errors on older WhatsApp clients.
|
|
67
125
|
|
|
68
126
|
### Native Flow Expansion
|
|
69
|
-
Additional supported button types:
|
|
70
127
|
|
|
128
|
+
<table>
|
|
129
|
+
<tr>
|
|
130
|
+
<td valign="top" width="33%">
|
|
131
|
+
|
|
132
|
+
**Buttons & Actions**
|
|
71
133
|
- cta_reminder
|
|
72
134
|
- cta_cancel_reminder
|
|
73
|
-
- address_message
|
|
74
|
-
- send_location
|
|
75
|
-
- catalog_message
|
|
76
|
-
- mpm
|
|
77
135
|
- otp_button
|
|
78
136
|
- authentication_button
|
|
79
137
|
- call_button
|
|
80
138
|
- url_button
|
|
81
139
|
- reply_button
|
|
140
|
+
- voice_call
|
|
141
|
+
- video_call_button
|
|
142
|
+
|
|
143
|
+
</td>
|
|
144
|
+
<td valign="top" width="33%">
|
|
145
|
+
|
|
146
|
+
**Commerce Flow**
|
|
147
|
+
- catalog_message
|
|
148
|
+
- mpm
|
|
82
149
|
- card_message
|
|
83
150
|
- order_details
|
|
84
151
|
- order_status
|
|
85
152
|
- review_and_pay
|
|
86
153
|
- payment_status
|
|
87
154
|
- payment_method
|
|
155
|
+
|
|
156
|
+
</td>
|
|
157
|
+
<td valign="top" width="33%">
|
|
158
|
+
|
|
159
|
+
**Navigation & Misc**
|
|
160
|
+
- address_message
|
|
161
|
+
- send_location
|
|
88
162
|
- track_order
|
|
89
163
|
- reorder
|
|
90
164
|
- cancel_order
|
|
91
165
|
- clear_chat
|
|
92
166
|
- navigateToScreen
|
|
93
167
|
- flow_action
|
|
94
|
-
|
|
95
|
-
|
|
168
|
+
|
|
169
|
+
</td>
|
|
170
|
+
</tr>
|
|
171
|
+
</table>
|
|
96
172
|
|
|
97
173
|
### System Notification Filter
|
|
174
|
+
|
|
98
175
|
Messages include:
|
|
99
176
|
|
|
100
177
|
```js
|
|
@@ -109,21 +186,21 @@ Useful for filtering:
|
|
|
109
186
|
|
|
110
187
|
---
|
|
111
188
|
|
|
112
|
-
|
|
189
|
+
## 📦 Installation
|
|
113
190
|
|
|
114
191
|
```bash
|
|
115
192
|
npm install @vanzxy/baileys
|
|
116
193
|
```
|
|
117
194
|
|
|
118
|
-
GitHub:
|
|
195
|
+
Directly from GitHub:
|
|
119
196
|
|
|
120
197
|
```bash
|
|
121
|
-
npm install github:
|
|
198
|
+
npm install github:vanzxysenpai/vanzxybaileys
|
|
122
199
|
```
|
|
123
200
|
|
|
124
201
|
---
|
|
125
202
|
|
|
126
|
-
|
|
203
|
+
## 🚀 Quick Start
|
|
127
204
|
|
|
128
205
|
```js
|
|
129
206
|
import { makeWASocket } from '@vanzxy/baileys'
|
|
@@ -131,51 +208,126 @@ import { makeWASocket } from '@vanzxy/baileys'
|
|
|
131
208
|
const sock = makeWASocket({
|
|
132
209
|
printQRInTerminal: true
|
|
133
210
|
})
|
|
211
|
+
|
|
212
|
+
sock.ev.on('connection.update', (update) => {
|
|
213
|
+
const { connection } = update
|
|
214
|
+
if (connection === 'open') console.log('🍃 Connected!')
|
|
215
|
+
})
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 💡 Usage Examples
|
|
221
|
+
|
|
222
|
+
### Buttons
|
|
223
|
+
```js
|
|
224
|
+
import { Button } from '@vanzxy/baileys'
|
|
225
|
+
|
|
226
|
+
await new Button(sock)
|
|
227
|
+
.setTitle('Promo Spesial')
|
|
228
|
+
.setBody('Diskon 20% cuma hari ini')
|
|
229
|
+
.setFooter('@vanzxy/baileys')
|
|
230
|
+
.addReply('Klaim Sekarang', 'claim_promo')
|
|
231
|
+
.addUrl('Lihat Katalog', 'https://example.com/catalog')
|
|
232
|
+
.send(jid)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### AIRich (rich response cards)
|
|
236
|
+
```js
|
|
237
|
+
import { AIRich } from '@vanzxy/baileys'
|
|
238
|
+
|
|
239
|
+
await new AIRich(sock)
|
|
240
|
+
.addHeading('Ringkasan Order')
|
|
241
|
+
.addText('Pesananmu sedang diproses.')
|
|
242
|
+
.addTable(['Item', 'Qty'], [['Kopi Susu', '2']])
|
|
243
|
+
.addSuggest('Lacak Order')
|
|
244
|
+
.send(jid)
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Carousel
|
|
248
|
+
```js
|
|
249
|
+
import { Carousel } from '@vanzxy/baileys'
|
|
250
|
+
|
|
251
|
+
const carousel = new Carousel()
|
|
252
|
+
.addCard({ title: 'Produk A', image: 'https://example.com/a.jpg' })
|
|
253
|
+
.addCard({ title: 'Produk B', image: 'https://example.com/b.jpg' })
|
|
254
|
+
|
|
255
|
+
await sock.relayMessage(jid, carousel.build(), {})
|
|
134
256
|
```
|
|
135
257
|
|
|
136
258
|
---
|
|
137
259
|
|
|
138
|
-
|
|
260
|
+
## 🛠 Recommended Environment
|
|
139
261
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
262
|
+
| Requirement | Version |
|
|
263
|
+
|---|---|
|
|
264
|
+
| Node.js | 18+ |
|
|
265
|
+
| Module system | ESM |
|
|
266
|
+
| WhatsApp | Latest Multi Device |
|
|
143
267
|
|
|
144
268
|
---
|
|
145
269
|
|
|
146
|
-
|
|
270
|
+
## 📚 Fork Lineage
|
|
147
271
|
|
|
272
|
+
```
|
|
148
273
|
@vanzxy/baileys
|
|
149
274
|
└── @itsliaaa/baileys
|
|
150
275
|
└── WhiskeySockets/Baileys
|
|
276
|
+
```
|
|
151
277
|
|
|
152
278
|
Respect to all original maintainers and contributors.
|
|
153
279
|
|
|
154
280
|
---
|
|
155
281
|
|
|
156
|
-
|
|
282
|
+
## 🙏 Credits
|
|
157
283
|
|
|
158
|
-
**
|
|
284
|
+
- **Nixel** (with contributions from **Ahmad tumbuh kembang**) — base implementation of the `MessageBuilder` (AIRich / Button / Carousel / Toolkit), originally "NIXCODE — Advanced WhatsApp Interactive Message Builder"
|
|
285
|
+
- **vinikjkkj** ([zapo](https://github.com/vinikjkkj/zapo)) — button/list addon-kind resolution logic
|
|
286
|
+
- **QueenAnya** (`@queenanya/baileys`) — interactive/native-flow button send layer
|
|
287
|
+
- **WhiskeySockets/Baileys** & **@itsliaaa/baileys** — upstream base
|
|
159
288
|
|
|
160
|
-
|
|
161
|
-
https://github.com/vanzxy
|
|
289
|
+
Full details and license terms per component: see [`NOTICE.md`](./NOTICE.md).
|
|
162
290
|
|
|
163
|
-
|
|
164
|
-
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## 📈 Repo Activity
|
|
294
|
+
|
|
295
|
+
<div align="center">
|
|
296
|
+
|
|
297
|
+

|
|
298
|
+
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
> Powered by [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) — updates automatically, no setup needed on this repo.
|
|
302
|
+
|
|
303
|
+
<details>
|
|
304
|
+
<summary>🎮 Want a 3D contribution graph on your own profile?</summary>
|
|
305
|
+
|
|
306
|
+
<br/>
|
|
307
|
+
|
|
308
|
+
That's a separate, opt-in GitHub Action for your **profile** repo (`username/username`), not something this package ships — see [github-profile-3d-contrib](https://github.com/yoshi389111/github-profile-3d-contrib) if you want to set it up for yourself.
|
|
309
|
+
|
|
310
|
+
</details>
|
|
165
311
|
|
|
166
312
|
---
|
|
167
313
|
|
|
168
|
-
|
|
314
|
+
## 👑 Maintainer
|
|
169
315
|
|
|
170
|
-
|
|
171
|
-
|
|
316
|
+
**Vanzxy**
|
|
317
|
+
|
|
318
|
+
- GitHub: [github.com/vanzxysenpai](https://github.com/vanzxysenpai)
|
|
319
|
+
- Package: [`@vanzxy/baileys`](https://www.npmjs.com/package/@vanzxy/baileys)
|
|
172
320
|
|
|
173
321
|
---
|
|
174
322
|
|
|
175
|
-
|
|
323
|
+
## ⚠️ Disclaimer
|
|
324
|
+
|
|
325
|
+
This project is an independent fork.
|
|
326
|
+
Use responsibly and follow WhatsApp Terms of Service.
|
|
176
327
|
|
|
328
|
+
---
|
|
177
329
|
|
|
178
|
-
## V4 Patch Notes
|
|
330
|
+
## 📝 V4 Patch Notes
|
|
179
331
|
|
|
180
332
|
- Kept the existing Vanzxy custom MessageBuilder classes and AIRich implementation intact.
|
|
181
333
|
- Added `whatsapp-rust-bridge@0.5.5` as a runtime dependency. The library already dynamically imports this module for LT Hash/app-state and crypto helpers; declaring it prevents accidental missing-module fallbacks in normal installations.
|
|
@@ -183,3 +335,15 @@ Made with 🍃 by Vanzxy
|
|
|
183
335
|
- ESM-only package metadata is preserved; no CommonJS build is included.
|
|
184
336
|
|
|
185
337
|
Reference audit: the supplied Ourin, Elaina, ItsLiaaa, and Noxleyss packages were compared before this patch. Their broader core changes were not copied wholesale because the current Vanzxy tree already contains additional LID, retry, media, interactive, and AIRich fixes that would risk regressions if replaced.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
<div align="center">
|
|
342
|
+
|
|
343
|
+
Made with 🍃 by **Vanzxy**
|
|
344
|
+
|
|
345
|
+
Thanks for stopping by! ✌️
|
|
346
|
+
|
|
347
|
+
<a href="#top">⬆️ Back to top</a>
|
|
348
|
+
|
|
349
|
+
</div>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# WAProto upgrade — progress checkpoint
|
|
2
|
+
|
|
3
|
+
Base: @vanzxy/baileys 1.6.6 WAProto (already the most complete of the 4 sources compared:
|
|
4
|
+
716 types vs wa-proto-main 603 / Baileys-5 570 / raphaelvserafim 569).
|
|
5
|
+
Diffed field-by-field against wa-proto-main (WA 2.3000.1046350168, newest available) to find real gaps.
|
|
6
|
+
|
|
7
|
+
## ✅ Applied in this checkpoint (session 1)
|
|
8
|
+
- `AIRichResponseMessage.originalRecipientMetadata` (field 5, type `AIRichResponseUnifiedResponse`)
|
|
9
|
+
— direct "airich" gap, full encode/decode/verify/fromObject/toObject wired.
|
|
10
|
+
- `BotMetadata.responseStoppedByUser` (field 44, bool) — full round-trip wired.
|
|
11
|
+
|
|
12
|
+
## ✅ Applied in this checkpoint (session 2 — pending queue cleared)
|
|
13
|
+
- `Message.VideoMessage.dashManifestUrl` (field 33, string) — full encode/decode/fromObject/toObject
|
|
14
|
+
wired alongside the existing `videoSourceType` enum field (30/31).
|
|
15
|
+
- `ContextInfo.experienceIds` (field 82, repeated packed uint32) — wired using the same packed-varint
|
|
16
|
+
pattern as `ADVKeyIndexList.validIndexes` (fork/ldelim on encode, packed-or-single fallback on decode).
|
|
17
|
+
- `DeviceCapabilities.BusinessBroadcast.proCompanionSupportEnabled` (field 6, bool) — full round-trip
|
|
18
|
+
wired next to the existing `recipientLimit` field.
|
|
19
|
+
- `Message.newsletterScheduledMessage` (field 132, reuses existing `FutureProofMessage` type) — wired
|
|
20
|
+
next to `botPlatformRegistrationSuccessMessage` (field 131).
|
|
21
|
+
- 3 new nested types under `SyncActionValue`, each a single-bool message built from scratch off the
|
|
22
|
+
`StarAction`/`CtwaMessageReceivedAction` template, then wired into the parent message at fields 94–96:
|
|
23
|
+
- `SharedDeviceAllowlistAction` (bool `allowed`) — field 94
|
|
24
|
+
- `ContactManagerMetadataAction` (bool `isHidden`) — field 95
|
|
25
|
+
- `BusinessFolderActivationAction` (bool `activated`) — field 96
|
|
26
|
+
|
|
27
|
+
**Pending queue is now empty** — every gap identified in the wa-proto-main diff has been applied.
|
|
28
|
+
|
|
29
|
+
## Already confirmed complete, no changes needed
|
|
30
|
+
Buttons (ButtonsMessage, TemplateButton, HydratedTemplateButton, ButtonsResponseMessage),
|
|
31
|
+
InteractiveMessage + NativeFlowMessage (incl. bloksWidget/A2UI), TemplateMessage,
|
|
32
|
+
ExtendedContentMessage (CTA buttons, XMA), ListMessage, all AIRichResponse* submessage types,
|
|
33
|
+
MessageContextInfo — all field-complete vs every reference source checked.
|
|
34
|
+
|
|
35
|
+
## Validation
|
|
36
|
+
- `node --check WAProto/index.js` — syntax clean after all edits.
|
|
37
|
+
- Functional round-trip (encode → decode → toObject) verified for all 5 session-2 fields, plus
|
|
38
|
+
regression checks confirming neighboring pre-existing fields (`videoSourceType`, `aiProvenance`,
|
|
39
|
+
`posterStatusId`, `botPlatformRegistrationSuccessMessage`, `ctwaMessageReceivedAction`, and
|
|
40
|
+
`BusinessBroadcast`'s other bool fields) still encode/decode correctly after the inserts.
|
|
41
|
+
Run against a hand-written wire-format shim (varint/string/bool/length-delimited), not the real
|
|
42
|
+
`protobufjs` package, since this sandbox has no network/registry access to install it — the shim
|
|
43
|
+
implements the exact subset of the protobufjs runtime API (`Writer`/`Reader`/`util`) that the
|
|
44
|
+
generated code calls, so it validates wire-format correctness but not protobufjs's own internals.
|
|
45
|
+
**Recommend re-running a quick smoke test against the real `protobufjs` package once installed in
|
|
46
|
+
your environment before shipping to production**, though the generated code path itself is
|
|
47
|
+
mechanically identical to every other field in this file.
|
|
48
|
+
|
|
49
|
+
index.js syntax-validated with `node --check` after this checkpoint's edits.
|
|
50
|
+
|
|
51
|
+
## Session 3 — full Button/AIRich/A2UI field audit (no gaps found)
|
|
52
|
+
Ran an exhaustive field-by-field diff of every Button-, AIRich-, and Interactive/NativeFlow (A2UI)
|
|
53
|
+
-related message against `wa-proto-main` (the newest reference in this bundle) and cross-checked
|
|
54
|
+
against `Baileys-5`:
|
|
55
|
+
|
|
56
|
+
- **Buttons**: `ButtonsMessage` (+ nested `Button`/`ButtonText`/`NativeFlowInfo`), `ButtonsResponseMessage`,
|
|
57
|
+
`TemplateButton`/`HydratedTemplateButton` (+ `QuickReplyButton`/`URLButton`/`CallButton` variants) —
|
|
58
|
+
field-complete, 1:1 match.
|
|
59
|
+
- **AIRich**: all 12 top-level `AIRichResponse*` messages (`Message`, `SubMessage`, `CodeMetadata`,
|
|
60
|
+
`ContentItemsMetadata`, `DynamicMetadata`, `GridImageMetadata`, `ImageURL`, `InlineImageMetadata`,
|
|
61
|
+
`LatexMetadata`, `MapMetadata`, `TableMetadata`, `UnifiedResponse`) — field-complete, including the
|
|
62
|
+
`originalRecipientMetadata` field added in session 1.
|
|
63
|
+
- **A2UI / Interactive**: `InteractiveMessage` (+ `BloksWidget`, `Header` incl. its own nested
|
|
64
|
+
`bloksWidget` field 10, `Footer`, `Body`, `CarouselMessage`, `CollectionMessage`, `NativeFlowMessage`
|
|
65
|
+
+ `NativeFlowButton`, `ShopMessage`), `InteractiveResponseMessage` (+ `Body`, `NativeFlowResponseMessage`),
|
|
66
|
+
`InteractiveAnnotation` — field-complete.
|
|
67
|
+
- `Baileys-5` (older/less complete source per this file's header) contributes nothing extra relevant —
|
|
68
|
+
its only two extra top-level messages (`LIDMigrationMapping`/`LIDMigrationMappingSyncPayload`) are the
|
|
69
|
+
deprecated pre-migration types already superseded and handled in session 26-08-26.
|
|
70
|
+
|
|
71
|
+
**Conclusion: the WAProto layer for Button/AIRich/A2UI is fully caught up — no further proto-level
|
|
72
|
+
patches identified.** Next stage for these features is JS-level (`lib/Utils/MessageBuilder.js`,
|
|
73
|
+
`lib/Utils/A2UI.js`) — wiring the newly-added fields (`dashManifestUrl`, `experienceIds`,
|
|
74
|
+
`newsletterScheduledMessage`, etc.) into builder APIs where relevant, not further WAProto edits.
|
|
75
|
+
|
|
76
|
+
## Session 4 — JS-level integration check
|
|
77
|
+
Checked whether `MessageBuilder.js`/`A2UI.js` need whitelist updates to expose the new proto fields:
|
|
78
|
+
|
|
79
|
+
- `dashManifestUrl` (VideoMessage) and `experienceIds` (ContextInfo): no gap. `setContextInfo(obj)`
|
|
80
|
+
merges the object verbatim (no field whitelist), and video-message construction elsewhere
|
|
81
|
+
(`sendPairedMedia`) spreads a plain object straight into `relayMessage` — any proto-valid field,
|
|
82
|
+
including these two, is already usable with zero code changes.
|
|
83
|
+
- `DeviceCapabilities.proCompanionSupportEnabled`: no gap, but not because it's already wired —
|
|
84
|
+
`DeviceCapabilities` isn't referenced anywhere in `lib/` (not part of this fork's companion
|
|
85
|
+
registration flow), so there's nothing to update.
|
|
86
|
+
- **Real gap found**: `lib/Utils/messages.js`'s `getFutureProofMessage()` — the whitelist function
|
|
87
|
+
`normalizeMessageContent()` uses to unwrap `FutureProofMessage`-typed fields — was missing
|
|
88
|
+
`botPlatformRegistrationSuccessMessage` (field 131, pre-existing) and `newsletterScheduledMessage`
|
|
89
|
+
(field 132, added this session). Both would have silently failed to unwrap: a message using either
|
|
90
|
+
wrapper would pass through `normalizeMessageContent()` unchanged instead of resolving to its inner
|
|
91
|
+
`message`. **Fixed** — both added to the whitelist. Syntax-checked (`node --check`) and functionally
|
|
92
|
+
verified both fields now correctly unwrap.
|
|
93
|
+
|
|
94
|
+
Bumped package version 1.6.6 → 1.6.7.
|
|
95
|
+
|
|
96
|
+
## Session 5 — resolved the standing "verify against live traffic" TODO
|
|
97
|
+
`lib/Utils/process-message.js`'s `decodeLidMigrationMappingSyncPayload()` (the hand-written decoder
|
|
98
|
+
from session 26-08-26, flagged since then as needing live-traffic verification) has now been
|
|
99
|
+
cross-checked against an independent source: `Baileys-5`'s bundled `WAProto.proto`, an older compiled
|
|
100
|
+
schema dump from before Meta stopped publishing this type's inner structure. It's an exact
|
|
101
|
+
field-for-field match:
|
|
102
|
+
- `LIDMigrationMappingSyncPayload { repeated pnToLidMappings = 1; optional chatDbMigrationTimestamp = 2 (uint64); }`
|
|
103
|
+
- `LIDMigrationMapping { pn = 1; assignedLid = 2; latestLid = 3; all uint64 }`
|
|
104
|
+
|
|
105
|
+
This isn't literal live WhatsApp traffic, but it is a real independent extraction agreeing byte-for-byte
|
|
106
|
+
with the from-scratch guess — meaningfully stronger evidence than "seems plausible," since an
|
|
107
|
+
independent tool derived the same field layout separately. Also ran a functional round-trip test
|
|
108
|
+
(hand-encoded a payload matching this exact structure, fed it through the actual decoder function) —
|
|
109
|
+
PASS. Updated the code comment to reflect this and removed the "TODO: verify" marker; the residual risk
|
|
110
|
+
(Meta silently changing the inner layout with zero signal) is unchanged and can only be closed by
|
|
111
|
+
actual live traffic, but the decoder is no longer running on-guess. Bumped package version 1.6.7 → 1.6.8.
|