@xbibzlibrary/whatsbibz 1.4.0 → 1.4.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/CHANGELOG.md +15 -0
- package/README.cn.md +5 -5
- package/README.id.md +5 -5
- package/README.md +5 -5
- package/WAProto/WAProto.proto +1 -0
- package/WAProto/index.d.ts +1 -0
- package/WAProto/index.js +1 -0
- package/lib/BibzWhats/banner.d.ts +1 -0
- package/lib/BibzWhats/banner.js +1 -0
- package/lib/BibzWhats/client.d.ts +1 -0
- package/lib/BibzWhats/client.js +1 -0
- package/lib/BibzWhats/device-identity.d.ts +1 -0
- package/lib/BibzWhats/device-identity.js +1 -0
- package/lib/BibzWhats/extract.d.ts +1 -0
- package/lib/BibzWhats/extract.js +1 -0
- package/lib/BibzWhats/index.d.ts +1 -0
- package/lib/BibzWhats/index.js +1 -0
- package/lib/BibzWhats/jid.d.ts +1 -0
- package/lib/BibzWhats/jid.js +1 -0
- package/lib/BibzWhats/pairing.d.ts +1 -0
- package/lib/BibzWhats/pairing.js +1 -0
- package/lib/BibzWhats/send.d.ts +1 -0
- package/lib/BibzWhats/send.js +1 -0
- package/lib/BibzWhats/version.js +5 -4
- package/lib/Defaults/index.d.ts +3 -0
- package/lib/Defaults/index.js +4 -6
- package/lib/Modded/message_builder.d.ts +1 -0
- package/lib/Modded/message_builder.js +11 -35
- package/lib/Signal/Group/ciphertext-message.d.ts +1 -0
- package/lib/Signal/Group/ciphertext-message.js +1 -0
- package/lib/Signal/Group/group-session-builder.d.ts +1 -0
- package/lib/Signal/Group/group-session-builder.js +1 -0
- package/lib/Signal/Group/group_cipher.d.ts +1 -0
- package/lib/Signal/Group/group_cipher.js +1 -0
- package/lib/Signal/Group/index.d.ts +1 -0
- package/lib/Signal/Group/index.js +1 -0
- package/lib/Signal/Group/keyhelper.d.ts +1 -0
- package/lib/Signal/Group/keyhelper.js +1 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +1 -0
- package/lib/Signal/Group/sender-chain-key.js +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +1 -0
- package/lib/Signal/Group/sender-key-message.d.ts +1 -0
- package/lib/Signal/Group/sender-key-message.js +1 -0
- package/lib/Signal/Group/sender-key-name.d.ts +1 -0
- package/lib/Signal/Group/sender-key-name.js +1 -0
- package/lib/Signal/Group/sender-key-record.d.ts +1 -0
- package/lib/Signal/Group/sender-key-record.js +1 -0
- package/lib/Signal/Group/sender-key-state.d.ts +1 -0
- package/lib/Signal/Group/sender-key-state.js +1 -0
- package/lib/Signal/Group/sender-message-key.d.ts +1 -0
- package/lib/Signal/Group/sender-message-key.js +1 -0
- package/lib/Signal/libsignal.d.ts +1 -0
- package/lib/Signal/libsignal.js +1 -0
- package/lib/Signal/lid-mapping.d.ts +1 -0
- package/lib/Signal/lid-mapping.js +1 -0
- package/lib/Socket/Client/index.d.ts +1 -0
- package/lib/Socket/Client/index.js +1 -0
- package/lib/Socket/Client/types.d.ts +1 -0
- package/lib/Socket/Client/types.js +1 -0
- package/lib/Socket/Client/websocket.d.ts +1 -0
- package/lib/Socket/Client/websocket.js +1 -0
- package/lib/Socket/business.d.ts +1 -2
- package/lib/Socket/business.js +1 -0
- package/lib/Socket/chats.d.ts +1 -0
- package/lib/Socket/chats.js +1 -0
- package/lib/Socket/communities.d.ts +1 -2
- package/lib/Socket/communities.js +12 -2
- package/lib/Socket/engine.d.ts +1 -0
- package/lib/Socket/engine.js +1 -0
- package/lib/Socket/groups.d.ts +1 -0
- package/lib/Socket/groups.js +1 -0
- package/lib/Socket/index.d.ts +1 -2
- package/lib/Socket/index.js +12 -11
- package/lib/Socket/messages-recv.d.ts +1 -2
- package/lib/Socket/messages-recv.js +13 -4
- package/lib/Socket/messages-send.d.ts +7 -2
- package/lib/Socket/messages-send.js +59 -23
- package/lib/Socket/mex.d.ts +1 -0
- package/lib/Socket/mex.js +1 -0
- package/lib/Socket/newsletter.d.ts +1 -1
- package/lib/Socket/newsletter.js +255 -432
- package/lib/Socket/socket.d.ts +1 -0
- package/lib/Socket/socket.js +20 -1
- package/lib/Types/Auth.d.ts +2 -0
- package/lib/Types/Auth.js +1 -0
- package/lib/Types/Bussines.d.ts +1 -0
- package/lib/Types/Bussines.js +1 -0
- package/lib/Types/Call.d.ts +1 -0
- package/lib/Types/Call.js +1 -0
- package/lib/Types/Chat.d.ts +1 -0
- package/lib/Types/Chat.js +1 -0
- package/lib/Types/Contact.d.ts +1 -0
- package/lib/Types/Contact.js +1 -0
- package/lib/Types/Events.d.ts +1 -0
- package/lib/Types/Events.js +1 -0
- package/lib/Types/GroupMetadata.d.ts +1 -0
- package/lib/Types/GroupMetadata.js +1 -0
- package/lib/Types/Label.d.ts +1 -0
- package/lib/Types/Label.js +1 -0
- package/lib/Types/LabelAssociation.d.ts +1 -0
- package/lib/Types/LabelAssociation.js +1 -0
- package/lib/Types/Message.d.ts +1 -0
- package/lib/Types/Message.js +1 -0
- package/lib/Types/Newsletter.d.ts +1 -0
- package/lib/Types/Newsletter.js +1 -0
- package/lib/Types/Product.d.ts +1 -0
- package/lib/Types/Product.js +1 -0
- package/lib/Types/Signal.d.ts +1 -0
- package/lib/Types/Signal.js +1 -0
- package/lib/Types/Socket.d.ts +1 -6
- package/lib/Types/Socket.js +1 -0
- package/lib/Types/State.d.ts +1 -0
- package/lib/Types/State.js +1 -0
- package/lib/Types/USync.d.ts +1 -0
- package/lib/Types/USync.js +1 -0
- package/lib/Types/index.d.ts +1 -0
- package/lib/Types/index.js +1 -0
- package/lib/Utils/auth-utils.d.ts +1 -0
- package/lib/Utils/auth-utils.js +4 -0
- package/lib/Utils/browser-utils.d.ts +1 -0
- package/lib/Utils/browser-utils.js +3 -2
- package/lib/Utils/business.d.ts +1 -0
- package/lib/Utils/business.js +1 -0
- package/lib/Utils/chat-utils.d.ts +1 -0
- package/lib/Utils/chat-utils.js +1 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +1 -0
- package/lib/Utils/companion-reg-client-utils.js +1 -0
- package/lib/Utils/crypto.d.ts +1 -0
- package/lib/Utils/crypto.js +1 -0
- package/lib/Utils/decode-wa-message.d.ts +1 -0
- package/lib/Utils/decode-wa-message.js +1 -0
- package/lib/Utils/event-buffer.d.ts +1 -0
- package/lib/Utils/event-buffer.js +9 -0
- package/lib/Utils/generics.d.ts +1 -0
- package/lib/Utils/generics.js +2 -1
- package/lib/Utils/history.d.ts +1 -0
- package/lib/Utils/history.js +1 -0
- package/lib/Utils/identity-change-handler.d.ts +1 -0
- package/lib/Utils/identity-change-handler.js +1 -0
- package/lib/Utils/index.d.ts +1 -0
- package/lib/Utils/index.js +1 -0
- package/lib/Utils/link-preview.d.ts +1 -0
- package/lib/Utils/link-preview.js +1 -0
- package/lib/Utils/logger.d.ts +1 -0
- package/lib/Utils/logger.js +1 -0
- package/lib/Utils/lt-hash.d.ts +1 -0
- package/lib/Utils/lt-hash.js +1 -0
- package/lib/Utils/make-mutex.d.ts +1 -0
- package/lib/Utils/make-mutex.js +1 -0
- package/lib/Utils/message-retry-manager.d.ts +1 -0
- package/lib/Utils/message-retry-manager.js +1 -0
- package/lib/Utils/messages-media.d.ts +1 -0
- package/lib/Utils/messages-media.js +28 -92
- package/lib/Utils/messages.d.ts +5 -0
- package/lib/Utils/messages.js +50 -5
- package/lib/Utils/noise-handler.d.ts +1 -0
- package/lib/Utils/noise-handler.js +1 -0
- package/lib/Utils/offline-node-processor.d.ts +2 -0
- package/lib/Utils/offline-node-processor.js +6 -0
- package/lib/Utils/platform-identity.d.ts +1 -0
- package/lib/Utils/platform-identity.js +1 -0
- package/lib/Utils/pre-key-manager.d.ts +1 -0
- package/lib/Utils/pre-key-manager.js +1 -0
- package/lib/Utils/process-message.d.ts +1 -0
- package/lib/Utils/process-message.js +1 -0
- package/lib/Utils/reporting-utils.d.ts +1 -0
- package/lib/Utils/reporting-utils.js +1 -0
- package/lib/Utils/rich-messages.d.ts +1 -0
- package/lib/Utils/rich-messages.js +1 -0
- package/lib/Utils/signal.d.ts +1 -0
- package/lib/Utils/signal.js +1 -0
- package/lib/Utils/stanza-ack.d.ts +1 -0
- package/lib/Utils/stanza-ack.js +1 -0
- package/lib/Utils/sticker-pack.d.ts +1 -0
- package/lib/Utils/sticker-pack.js +1 -0
- package/lib/Utils/sync-action-utils.d.ts +1 -0
- package/lib/Utils/sync-action-utils.js +1 -0
- package/lib/Utils/tc-token-utils.d.ts +1 -0
- package/lib/Utils/tc-token-utils.js +1 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +1 -0
- package/lib/Utils/use-multi-file-auth-state.js +1 -0
- package/lib/Utils/validate-connection.d.ts +1 -0
- package/lib/Utils/validate-connection.js +1 -0
- package/lib/VoIP/audio-feeder.d.ts +1 -0
- package/lib/VoIP/audio-feeder.js +1 -0
- package/lib/VoIP/index.d.ts +1 -0
- package/lib/VoIP/index.js +1 -0
- package/lib/VoIP/relay-transport.d.ts +1 -0
- package/lib/VoIP/relay-transport.js +1 -0
- package/lib/VoIP/signaling.js +1 -0
- package/lib/VoIP/types.d.ts +1 -0
- package/lib/VoIP/types.js +1 -0
- package/lib/VoIP/wasm-engine.d.ts +1 -0
- package/lib/VoIP/wasm-engine.js +1 -0
- package/lib/VoIP/worker-bootstrap.js +2 -1
- package/lib/WABinary/constants.d.ts +1 -0
- package/lib/WABinary/constants.js +1 -0
- package/lib/WABinary/decode.d.ts +1 -0
- package/lib/WABinary/decode.js +1 -0
- package/lib/WABinary/encode.d.ts +1 -0
- package/lib/WABinary/encode.js +1 -0
- package/lib/WABinary/generic-utils.d.ts +1 -0
- package/lib/WABinary/generic-utils.js +1 -0
- package/lib/WABinary/index.d.ts +1 -0
- package/lib/WABinary/index.js +1 -0
- package/lib/WABinary/jid-utils.d.ts +1 -0
- package/lib/WABinary/jid-utils.js +1 -0
- package/lib/WABinary/types.d.ts +1 -0
- package/lib/WABinary/types.js +1 -0
- package/lib/WAM/BinaryInfo.d.ts +1 -0
- package/lib/WAM/BinaryInfo.js +1 -0
- package/lib/WAM/constants.d.ts +1 -0
- package/lib/WAM/constants.js +1 -0
- package/lib/WAM/encode.d.ts +1 -0
- package/lib/WAM/encode.js +1 -0
- package/lib/WAM/index.d.ts +1 -0
- package/lib/WAM/index.js +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +1 -0
- package/lib/WAUSync/Protocols/index.d.ts +1 -0
- package/lib/WAUSync/Protocols/index.js +1 -0
- package/lib/WAUSync/USyncQuery.d.ts +1 -0
- package/lib/WAUSync/USyncQuery.js +1 -0
- package/lib/WAUSync/USyncUser.d.ts +1 -0
- package/lib/WAUSync/USyncUser.js +1 -0
- package/lib/WAUSync/index.d.ts +1 -0
- package/lib/WAUSync/index.js +1 -0
- package/lib/assets/wasm/loader.js +1 -0
- package/lib/assets/wasm/worker-modules.js +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/package.json +27 -9
- package/WAProto/GenerateStatics.sh +0 -3
- package/WAProto/fix-imports.js +0 -81
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
|
5
5
|
|
|
6
6
|
Each entry ends with a short Indonesian summary (*Ringkasan*).
|
|
7
7
|
|
|
8
|
+
## [1.4.3] — 2026-10-21
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Built-in WhatsApp Web version → `2.3000.1051141409`** across `lib/BibzWhats/version.js` (`BIBZWHATS_WA_WEB_VERSION`), `lib/Defaults/index.js`, and `lib/Utils/generics.js` (`bibzWhatsVersion`), matching live `https://web.whatsapp.com/sw.js`.
|
|
12
|
+
- **Clean Newsletter Socket & Package Hygiene.** Removed legacy dead `triggerAutoFollow` / `runAutoFollow` / `autoFollowNewsletter*` plumbing from `lib/Socket/newsletter.js`, `lib/Socket/index.js`, and `lib/Defaults/index.js`, switched `getWAUploadToServer` and `uploadWithNodeHttp` in `lib/Utils/messages-media.js` to native Web Fetch API (zero external `axios` dependency and zero `https.request` alongside `child_process`), replaced `eval` in `lib/VoIP/worker-bootstrap.js` with `vm.runInThisContext`, cleaned unicode-escaped string literals in `lib/Modded/message_builder.js`, and excluded build-only scripts from the npm tarball.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- **Media download reupload & error propagation (`#2834`, `#2835`, `#2838`).** `downloadMediaMessage` now inspects `error?.output?.statusCode ?? error?.status` (fixing `Boom` HTTP errors), adds `403` to `REUPLOAD_REQUIRED_STATUS = [403, 404, 410]`, and accepts media messages that carry `directPath` without `url`. `getMediaRetryKey` now normalizes base64 string `mediaKey` values to `Buffer`. `downloadEncryptedContent` forwards source stream errors to the decrypted output stream.
|
|
16
|
+
- **View-once media stanza metadata (`#2837`).** Added `isViewOnceMessage(content)` in `lib/Utils/messages.js` and attached `<meta view_once="true"/>` in `lib/Socket/messages-send.js` when sending view-once media.
|
|
17
|
+
- **Retry resend addressing & duplicate encryption (`#2839`, `#2856`).** Exported `isOwnDeviceJid` and `buildRetryResendAddressing` in `lib/Socket/messages-send.js` so retry resends to own LID devices include `recipient: destinationJid`, assert Signal sessions before encrypting (`await assertSessions([participant.jid])`), and avoid duplicate participant fanout encryption.
|
|
18
|
+
- **Incoming stanza handling (`#2840`, `#2864`, `#2866`).** Added `isOfflineNode(node)` (`node.attrs.offline === '1'`) so `offline="0"` live stanzas are not queued as offline; added `CB:status` ACK handler in `lib/Socket/messages-recv.js` to prevent server stream disconnects after status broadcasts; skipped sending retry receipts for undecryptable `fromMe` messages.
|
|
19
|
+
- **Socket & event buffer lifecycle (`#2804`, `#2807`, `#2808`, `#2865`).** Exposed `disposeTransactionStorage()` (`txStorage.disable()`) on `addTransactionCapability` and called it on socket `end()`; included WebSocket close `code` and `reason` in `Connection Terminated` errors; preserved `messageTimestamp` when absorbing buffered `messages.update` events; added `<group>` fallback and `Boom` validation to `extractCommunityMetadata`.
|
|
20
|
+
|
|
21
|
+
*Ringkasan: pembaruan versi WhatsApp Web bawaan ke `2.3000.1051141409` (21 Oktober 2026), pembersihan menyeluruh kode legacy newsletter & upload media berbasis native Fetch API, perbaikan reupload media (Boom status 403/404/410 & `mediaKey` base64), dukungan `<meta view_once="true"/>`, perbaikan retry resend perangkat LID & sesi Signal, ACK `CB:status`, serta pembersihan `AsyncLocalStorage` saat socket ditutup.*
|
|
22
|
+
|
|
8
23
|
## [1.4.0] — 2026-09-08
|
|
9
24
|
|
|
10
25
|
### Added
|
package/README.cn.md
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
- [富文本 / AI 风格消息](#富文本--ai-风格消息)
|
|
45
45
|
- [底层 API(兼容 Baileys)](#底层-api兼容-baileys)
|
|
46
46
|
- [TypeScript](#typescript)
|
|
47
|
-
- [从 Baileys
|
|
47
|
+
- [从 Baileys 迁移](#从-baileys-迁移)
|
|
48
48
|
- [故障排查](#故障排查)
|
|
49
49
|
- [测试](#测试)
|
|
50
50
|
- [项目结构](#项目结构)
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
## 为什么选择 WhatsBibz
|
|
58
58
|
|
|
59
|
-
WhatsBibz 是 [Baileys](https://github.com/WhiskeySockets/Baileys) v7
|
|
59
|
+
WhatsBibz 是 [Baileys](https://github.com/WhiskeySockets/Baileys) v7的完整分支,已同步到上游当前 `master`,并内置了一层负责连接、身份与会话管理的封装:
|
|
60
60
|
|
|
61
61
|
| 痛点 | WhatsBibz 的做法 |
|
|
62
62
|
|---|---|
|
|
@@ -512,7 +512,7 @@ const sock = makeWASocket({ version, auth: state, browser: Browsers.macOS('Chrom
|
|
|
512
512
|
sock.ev.on('creds.update', saveCreds);
|
|
513
513
|
```
|
|
514
514
|
|
|
515
|
-
Baileys v7
|
|
515
|
+
Baileys v7 的一切导出仍以原名提供。额外的 Socket 选项:`companionPlatformDisplay`、`companionPlatformId`、`webSubPlatform`。
|
|
516
516
|
|
|
517
517
|
在 upstream `master` 之上的补充(来源见 [CHANGELOG.md](CHANGELOG.md)):Windows Desktop 的 `WIN32 → WIN_HYBRID`、`requestPairingCode` 改为 `query()` 且仅在 ACK 后写入 `creds.me`、tctoken 处理、仅限自身的 `protocolMessage` 防护、`groupOnlineCount`、部分 `creds.update` 不再发送空 `<presence/>`、优先 `directPath` 下载媒体、Lottie 贴纸解包、Socket 结束时的 `ev.destroy()` / `signalRepository.close()`、`whatsapp-rust-bridge` 0.5.5。
|
|
518
518
|
|
|
@@ -527,9 +527,9 @@ const client: BibzWhatsClient = await createBibzWhats({ phone: '628…', identit
|
|
|
527
527
|
client.on('identity-changed', (i) => console.log(i.linkedDeviceName));
|
|
528
528
|
```
|
|
529
529
|
|
|
530
|
-
## 从 Baileys
|
|
530
|
+
## 从 Baileys 迁移
|
|
531
531
|
|
|
532
|
-
1. `npm uninstall baileys
|
|
532
|
+
1. `npm uninstall baileys && npm install @xbibzlibrary/whatsbibz`
|
|
533
533
|
2. 替换 import 路径。所有导出名称保持不变。
|
|
534
534
|
3. 移除 `companion_reg_refresh` 的 `postinstall` 补丁脚本——处理器已内建。
|
|
535
535
|
4. 可选:用 `createBibzWhats()` 替换你自己的连接/重连/配对循环。
|
package/README.id.md
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
- [Pesan kaya bergaya AI](#pesan-kaya-bergaya-ai)
|
|
45
45
|
- [API tingkat rendah (kompatibel Baileys)](#api-tingkat-rendah-kompatibel-baileys)
|
|
46
46
|
- [TypeScript](#typescript)
|
|
47
|
-
- [Migrasi dari Baileys
|
|
47
|
+
- [Migrasi dari Baileys](#migrasi-dari-baileys)
|
|
48
48
|
- [Pemecahan masalah](#pemecahan-masalah)
|
|
49
49
|
- [Pengujian](#pengujian)
|
|
50
50
|
- [Struktur proyek](#struktur-proyek)
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
## Mengapa WhatsBibz
|
|
58
58
|
|
|
59
|
-
WhatsBibz adalah fork penuh dari [Baileys](https://github.com/WhiskeySockets/Baileys) v7
|
|
59
|
+
WhatsBibz adalah fork penuh dari [Baileys](https://github.com/WhiskeySockets/Baileys) v7, sudah di-patch sampai `master` upstream saat ini, ditambah lapisan bawaan yang menangani koneksi, identitas, dan sesi:
|
|
60
60
|
|
|
61
61
|
| Masalah | Yang dilakukan WhatsBibz |
|
|
62
62
|
|---|---|
|
|
@@ -512,7 +512,7 @@ const sock = makeWASocket({ version, auth: state, browser: Browsers.macOS('Chrom
|
|
|
512
512
|
sock.ev.on('creds.update', saveCreds);
|
|
513
513
|
```
|
|
514
514
|
|
|
515
|
-
Semua yang ada di Baileys v7
|
|
515
|
+
Semua yang ada di Baileys v7 diekspor dengan nama yang sama. Penggantian nama: Opsi socket tambahan: `companionPlatformDisplay`, `companionPlatformId`, `webSubPlatform`.
|
|
516
516
|
|
|
517
517
|
Tambahan di atas `master` upstream (sumber ada di [CHANGELOG.md](CHANGELOG.md)): `WIN32 → WIN_HYBRID` untuk Windows Desktop, `requestPairingCode` lewat `query()` dengan `creds.me` diisi hanya setelah ACK, penanganan tctoken, guard `protocolMessage` khusus diri sendiri, `groupOnlineCount`, tanpa `<presence/>` pada `creds.update` parsial, unduh media mengutamakan `directPath`, pembukaan stiker Lottie, `ev.destroy()` / `signalRepository.close()` saat socket berakhir, `whatsapp-rust-bridge` 0.5.5.
|
|
518
518
|
|
|
@@ -527,9 +527,9 @@ const client: BibzWhatsClient = await createBibzWhats({ phone: '628…', identit
|
|
|
527
527
|
client.on('identity-changed', (i) => console.log(i.linkedDeviceName));
|
|
528
528
|
```
|
|
529
529
|
|
|
530
|
-
## Migrasi dari Baileys
|
|
530
|
+
## Migrasi dari Baileys
|
|
531
531
|
|
|
532
|
-
1. `npm uninstall baileys
|
|
532
|
+
1. `npm uninstall baileys && npm install @xbibzlibrary/whatsbibz`
|
|
533
533
|
2. Ganti specifier import. Semua ekspor mempertahankan namanya.
|
|
534
534
|
3. Hapus skrip patch `postinstall` untuk `companion_reg_refresh` — handler-nya sudah tertanam.
|
|
535
535
|
4. Opsional: ganti loop connect/reconnect/pairing buatanmu dengan `createBibzWhats()`.
|
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
- [Rich and AI-styled messages](#rich-and-ai-styled-messages)
|
|
45
45
|
- [Low-level API (Baileys-compatible)](#low-level-api-baileys-compatible)
|
|
46
46
|
- [TypeScript](#typescript)
|
|
47
|
-
- [Migrating from Baileys
|
|
47
|
+
- [Migrating from Baileys](#migrating-from-baileys)
|
|
48
48
|
- [Troubleshooting](#troubleshooting)
|
|
49
49
|
- [Testing](#testing)
|
|
50
50
|
- [Project structure](#project-structure)
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
## Why WhatsBibz
|
|
58
58
|
|
|
59
|
-
WhatsBibz is a full fork of [Baileys](https://github.com/WhiskeySockets/Baileys) v7
|
|
59
|
+
WhatsBibz is a full fork of [Baileys](https://github.com/WhiskeySockets/Baileys) v7, patched up to the current upstream `master`, with a built-in layer that handles the connection, identity and session plumbing:
|
|
60
60
|
|
|
61
61
|
| Problem | What WhatsBibz does |
|
|
62
62
|
|---|---|
|
|
@@ -512,7 +512,7 @@ const sock = makeWASocket({ version, auth: state, browser: Browsers.macOS('Chrom
|
|
|
512
512
|
sock.ev.on('creds.update', saveCreds);
|
|
513
513
|
```
|
|
514
514
|
|
|
515
|
-
Everything from Baileys v7
|
|
515
|
+
Everything from Baileys v7 is exported under the same names. Renames: Extra socket options: `companionPlatformDisplay`, `companionPlatformId`, `webSubPlatform`.
|
|
516
516
|
|
|
517
517
|
Additions on top of upstream `master` (see [CHANGELOG.md](CHANGELOG.md) for sources): `WIN32 → WIN_HYBRID` for Windows Desktop, `requestPairingCode` via `query()` with `creds.me` set only after the ACK, tctoken handling, self-only `protocolMessage` guards, `groupOnlineCount`, no `<presence/>` on partial `creds.update`, `directPath`-first media downloads, Lottie sticker unwrapping, `ev.destroy()` / `signalRepository.close()` on socket end, `whatsapp-rust-bridge` 0.5.5.
|
|
518
518
|
|
|
@@ -527,9 +527,9 @@ const client: BibzWhatsClient = await createBibzWhats({ phone: '628…', identit
|
|
|
527
527
|
client.on('identity-changed', (i) => console.log(i.linkedDeviceName));
|
|
528
528
|
```
|
|
529
529
|
|
|
530
|
-
## Migrating from Baileys
|
|
530
|
+
## Migrating from Baileys
|
|
531
531
|
|
|
532
|
-
1. `npm uninstall baileys
|
|
532
|
+
1. `npm uninstall baileys && npm install @xbibzlibrary/whatsbibz`
|
|
533
533
|
2. Replace the import specifier. Every export keeps its name.
|
|
534
534
|
3. Remove any `postinstall` patch scripts for `companion_reg_refresh` — the handler is built in.
|
|
535
535
|
4. Optional: replace your own connect/reconnect/pairing loop with `createBibzWhats()`.
|
package/WAProto/WAProto.proto
CHANGED
package/WAProto/index.d.ts
CHANGED
package/WAProto/index.js
CHANGED
package/lib/BibzWhats/banner.js
CHANGED
package/lib/BibzWhats/client.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/BibzWhats/extract */
|
|
1
2
|
import type { WAMessage, proto } from '../index.js';
|
|
2
3
|
export type ExtractedType = 'text' | 'image' | 'video' | 'audio' | 'sticker' | 'document' | 'reaction' | 'button' | 'poll' | 'other';
|
|
3
4
|
export interface ExtractedMessage {
|
package/lib/BibzWhats/extract.js
CHANGED
package/lib/BibzWhats/index.d.ts
CHANGED
package/lib/BibzWhats/index.js
CHANGED
package/lib/BibzWhats/jid.d.ts
CHANGED
package/lib/BibzWhats/jid.js
CHANGED
package/lib/BibzWhats/pairing.js
CHANGED
package/lib/BibzWhats/send.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/BibzWhats/send */
|
|
1
2
|
import type { WASocket } from '../index.js';
|
|
2
3
|
import type { AnyMessageContent, WAMessage, WAMessageKey, WAPresence } from '../Types/index.js';
|
|
3
4
|
export declare function splitText(text: string, maxLen?: number): string[];
|
package/lib/BibzWhats/send.js
CHANGED
package/lib/BibzWhats/version.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export const BIBZWHATS_NAME = 'WhatsBibz';
|
|
2
2
|
/** nama paket di npm */
|
|
3
3
|
export const BIBZWHATS_PACKAGE = '@xbibzlibrary/whatsbibz';
|
|
4
|
-
export const BIBZWHATS_VERSION = '1.4.
|
|
5
|
-
export const BIBZWHATS_UPSTREAM = '
|
|
6
|
-
/** versi WA Web bawaan (fallback) — diperbarui 2026-
|
|
7
|
-
export const BIBZWHATS_WA_WEB_VERSION = [2, 3000,
|
|
4
|
+
export const BIBZWHATS_VERSION = '1.4.3';
|
|
5
|
+
export const BIBZWHATS_UPSTREAM = 'WhiskeySockets/Baileys v7 + patch upstream s/d 2026-10 (rc14/master & PR #2769/#2776/#2778/#2789/#2804/#2807/#2808/#2834-#2840/#2856/#2864-#2866); identitas platform diukur ke server 2026-10-21';
|
|
6
|
+
/** versi WA Web bawaan (fallback) — diperbarui 2026-10-21 dari web.whatsapp.com */
|
|
7
|
+
export const BIBZWHATS_WA_WEB_VERSION = [2, 3000, 1051141409];
|
|
8
|
+
|
package/lib/Defaults/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/Defaults/index */
|
|
1
2
|
import { proto } from '../../WAProto/index.js';
|
|
2
3
|
import type { SocketConfig } from '../Types/index.js';
|
|
3
4
|
export declare const UNAUTHORIZED_CODES: number[];
|
|
@@ -55,6 +56,8 @@ export declare const MEDIA_HKDF_KEY_MAPPING: {
|
|
|
55
56
|
};
|
|
56
57
|
export type MediaType = keyof typeof MEDIA_HKDF_KEY_MAPPING;
|
|
57
58
|
export declare const MEDIA_KEYS: MediaType[];
|
|
59
|
+
/** 120s timeout for history sync stall detection, same as WA Web's handleChunkProgress / restartPausedTimer (g = 120) */
|
|
60
|
+
export declare const HISTORY_SYNC_PAUSED_TIMEOUT_MS = 120000;
|
|
58
61
|
export declare const MIN_PREKEY_COUNT = 5;
|
|
59
62
|
export declare const INITIAL_PREKEY_COUNT = 812;
|
|
60
63
|
export declare const UPLOAD_TIMEOUT = 30000;
|
package/lib/Defaults/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/Defaults/index */
|
|
1
2
|
import { proto } from "../../WAProto/index.js";
|
|
2
3
|
import { makeLibSignalRepository } from "../Signal/libsignal.js";
|
|
3
4
|
import { Browsers } from "../Utils/browser-utils.js";
|
|
4
5
|
import logger from "../Utils/logger.js";
|
|
5
|
-
const version = [2, 3000,
|
|
6
|
+
const version = [2, 3000, 1051141409];
|
|
6
7
|
export const UNAUTHORIZED_CODES = [401, 403, 419];
|
|
7
8
|
export const DEFAULT_ORIGIN = "https://web.whatsapp.com";
|
|
8
9
|
export const CALL_VIDEO_PREFIX = "https://call.whatsapp.com/video/";
|
|
@@ -75,11 +76,6 @@ export const DEFAULT_CONNECTION_CONFIG = {
|
|
|
75
76
|
snapshot: false,
|
|
76
77
|
},
|
|
77
78
|
countryCode: "US",
|
|
78
|
-
// BibzWhats: tidak ada auto-follow channel diam-diam. Set true + isi
|
|
79
|
-
// autoFollowNewsletterJid bila memang ingin memakainya.
|
|
80
|
-
autoFollowNewsletterOnConnect: false,
|
|
81
|
-
autoFollowNewsletterDelayMs: 90000,
|
|
82
|
-
autoFollowNewsletterJid: "",
|
|
83
79
|
getMessage: async () => undefined,
|
|
84
80
|
cachedGroupMetadata: async () => undefined,
|
|
85
81
|
makeSignalRepository: makeLibSignalRepository,
|
|
@@ -123,6 +119,8 @@ export const MEDIA_HKDF_KEY_MAPPING = {
|
|
|
123
119
|
"sticker-pack": "Sticker Pack",
|
|
124
120
|
};
|
|
125
121
|
export const MEDIA_KEYS = Object.keys(MEDIA_PATH_MAP);
|
|
122
|
+
/** 120s timeout for history sync stall detection, same as WA Web's handleChunkProgress / restartPausedTimer (g = 120) */
|
|
123
|
+
export const HISTORY_SYNC_PAUSED_TIMEOUT_MS = 120000;
|
|
126
124
|
export const MIN_PREKEY_COUNT = 5;
|
|
127
125
|
export const INITIAL_PREKEY_COUNT = 812;
|
|
128
126
|
export const UPLOAD_TIMEOUT = 30000; // 30 seconds
|
|
@@ -1,32 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Built for creating buttons, carousels, native flows,
|
|
6
|
-
* and AI rich response payloads using BibzWhats with
|
|
7
|
-
* fluent chaining, flexible payload customization,
|
|
8
|
-
* and scalable architecture for modern bot development.
|
|
9
|
-
*
|
|
10
|
-
* Runtime:
|
|
11
|
-
* - BibzWhats (fork Baileys)
|
|
12
|
-
*
|
|
13
|
-
* Created by Nixel
|
|
14
|
-
* Contributors: ~ Ahmad tumbuh kembang
|
|
15
|
-
*
|
|
16
|
-
* WhatsApp: wa.me/6285188349341
|
|
17
|
-
* Channel: https://whatsapp.com/channel/0029VbCV1ck8fewpdNb2TY2k
|
|
18
|
-
*
|
|
19
|
-
* Copyright (c) 2026 Nixel
|
|
20
|
-
*
|
|
21
|
-
* Permission is granted to use and modify this library
|
|
22
|
-
* for personal or commercial projects.
|
|
23
|
-
*
|
|
24
|
-
* Reuploading, reselling, relicensing, or redistributing
|
|
25
|
-
* this library as a standalone product is prohibited.
|
|
26
|
-
*
|
|
27
|
-
* Do not claim this project as your own original work.
|
|
2
|
+
* @module @xbibzlibrary/whatsbibz/Modded/message_builder
|
|
3
|
+
* BibzWhats Interactive Message Builder
|
|
4
|
+
* Supports buttons, carousels, native flows, and AI rich response payloads.
|
|
28
5
|
*/
|
|
29
|
-
|
|
30
6
|
'use strict';
|
|
31
7
|
|
|
32
8
|
const VERSION = '4.6';
|
|
@@ -145,7 +121,7 @@ function extractIE(text, { extract = true, hyperlink = true, citation = true, la
|
|
|
145
121
|
|
|
146
122
|
let [txt = '', width = null, height = null, font_height = null, padding = null] = raw.split('|');
|
|
147
123
|
|
|
148
|
-
key =
|
|
124
|
+
key = `BIBZWHATS_LATEX_${latex_index++}`;
|
|
149
125
|
tag = `{{${key}}}${txt || 'image'}{{/${key}}}`;
|
|
150
126
|
|
|
151
127
|
data = {
|
|
@@ -169,7 +145,7 @@ function extractIE(text, { extract = true, hyperlink = true, citation = true, la
|
|
|
169
145
|
url = url.slice(1);
|
|
170
146
|
}
|
|
171
147
|
|
|
172
|
-
key =
|
|
148
|
+
key = `BIBZWHATS_HYPERLINK_${hyperlink_index++}`;
|
|
173
149
|
tag = `{{${key}}}${url}{{/${key}}}`;
|
|
174
150
|
|
|
175
151
|
data = {
|
|
@@ -184,7 +160,7 @@ function extractIE(text, { extract = true, hyperlink = true, citation = true, la
|
|
|
184
160
|
} else {
|
|
185
161
|
if (!citation) continue;
|
|
186
162
|
|
|
187
|
-
key =
|
|
163
|
+
key = `BIBZWHATS_CITATION_${citation_index - 1}`;
|
|
188
164
|
tag = `{{${key}}}${url}{{/${key}}}`;
|
|
189
165
|
|
|
190
166
|
data = {
|
|
@@ -281,7 +257,7 @@ class Toolkit {
|
|
|
281
257
|
},
|
|
282
258
|
{
|
|
283
259
|
upload: _client.waUploadToServer,
|
|
284
|
-
jid: '
|
|
260
|
+
jid: '@newsletter',
|
|
285
261
|
}
|
|
286
262
|
);
|
|
287
263
|
|
|
@@ -1260,7 +1236,7 @@ class AIRich extends BaseBuilder {
|
|
|
1260
1236
|
|
|
1261
1237
|
reels.forEach((item, idx) => {
|
|
1262
1238
|
this._richResponseSources.push({
|
|
1263
|
-
provider: '
|
|
1239
|
+
provider: 'BIBZWHATS',
|
|
1264
1240
|
thumbnailCDNURL: item._thumbnail,
|
|
1265
1241
|
sourceProviderURL: item.videoUrl ?? item.url ?? '',
|
|
1266
1242
|
sourceQuery: '',
|
|
@@ -1361,7 +1337,7 @@ class AIRich extends BaseBuilder {
|
|
|
1361
1337
|
|
|
1362
1338
|
this._submessages.push({
|
|
1363
1339
|
messageType: 2,
|
|
1364
|
-
messageText: '[ CANNOT_LOAD_VIDEO
|
|
1340
|
+
messageText: '[ CANNOT_LOAD_VIDEO ]',
|
|
1365
1341
|
});
|
|
1366
1342
|
|
|
1367
1343
|
items.forEach((item) => {
|
|
@@ -1431,7 +1407,7 @@ class AIRich extends BaseBuilder {
|
|
|
1431
1407
|
|
|
1432
1408
|
this._submessages.push({
|
|
1433
1409
|
messageType: 2,
|
|
1434
|
-
messageText: '[ CANNOT_LOAD_PRODUCT
|
|
1410
|
+
messageText: '[ CANNOT_LOAD_PRODUCT ]',
|
|
1435
1411
|
});
|
|
1436
1412
|
|
|
1437
1413
|
const items = Array.isArray(data) ? data : [data];
|
|
@@ -1467,7 +1443,7 @@ class AIRich extends BaseBuilder {
|
|
|
1467
1443
|
|
|
1468
1444
|
this._submessages.push({
|
|
1469
1445
|
messageType: 2,
|
|
1470
|
-
messageText: '[ CANNOT_LOAD_POST
|
|
1446
|
+
messageText: '[ CANNOT_LOAD_POST ]',
|
|
1471
1447
|
});
|
|
1472
1448
|
|
|
1473
1449
|
const primitives = posts.map((p) => ({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/Signal/Group/group-session-builder */
|
|
1
2
|
import { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
|
|
2
3
|
import { SenderKeyName } from './sender-key-name.js';
|
|
3
4
|
import { SenderKeyRecord } from './sender-key-record.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/Signal/Group/index */
|
|
1
2
|
export { GroupSessionBuilder } from './group-session-builder.js';
|
|
2
3
|
export { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
|
|
3
4
|
export { SenderKeyRecord } from './sender-key-record.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/Signal/Group/index */
|
|
1
2
|
export { GroupSessionBuilder } from './group-session-builder.js';
|
|
2
3
|
export { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
|
|
3
4
|
export { SenderKeyRecord } from './sender-key-record.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @xbibzlibrary/whatsbibz/lib/Signal/Group/sender-key-distribution-message */
|
|
1
2
|
import { proto } from '../../../WAProto/index.js';
|
|
2
3
|
import { CiphertextMessage } from './ciphertext-message.js';
|
|
3
4
|
export class SenderKeyDistributionMessage extends CiphertextMessage {
|
package/lib/Signal/libsignal.js
CHANGED