@mdsockets/baileys 0.0.0-stage → 4.2.8
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 +214 -2
- package/WAProto/index.js +169661 -0
- package/engine-requirements.js +10 -0
- package/lib/Defaults/baileys-version.json +1 -0
- package/lib/Defaults/index.d.ts +53 -0
- package/lib/Defaults/index.js +147 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/lib/Signal/Group/ciphertext-message.js +15 -0
- package/lib/Signal/Group/group-session-builder.d.ts +14 -0
- package/lib/Signal/Group/group-session-builder.js +64 -0
- package/lib/Signal/Group/group_cipher.d.ts +17 -0
- package/lib/Signal/Group/group_cipher.js +96 -0
- package/lib/Signal/Group/index.d.ts +11 -0
- package/lib/Signal/Group/index.js +57 -0
- package/lib/Signal/Group/keyhelper.d.ts +10 -0
- package/lib/Signal/Group/keyhelper.js +55 -0
- package/lib/Signal/Group/queue-job.d.ts +1 -0
- package/lib/Signal/Group/queue-job.js +57 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
- package/lib/Signal/Group/sender-chain-key.js +34 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
- package/lib/Signal/Group/sender-key-message.d.ts +18 -0
- package/lib/Signal/Group/sender-key-message.js +69 -0
- package/lib/Signal/Group/sender-key-name.d.ts +17 -0
- package/lib/Signal/Group/sender-key-name.js +51 -0
- package/lib/Signal/Group/sender-key-record.d.ts +30 -0
- package/lib/Signal/Group/sender-key-record.js +53 -0
- package/lib/Signal/Group/sender-key-state.d.ts +38 -0
- package/lib/Signal/Group/sender-key-state.js +99 -0
- package/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/lib/Signal/Group/sender-message-key.js +29 -0
- package/lib/Signal/libsignal.d.ts +3 -0
- package/lib/Signal/libsignal.js +453 -0
- package/lib/Signal/lid-mapping.js +293 -0
- package/lib/Socket/Client/abstract-socket-client.d.ts +17 -0
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.d.ts +3 -0
- package/lib/Socket/Client/index.js +19 -0
- package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/web-socket-client.d.ts +12 -0
- package/lib/Socket/Client/web-socket-client.js +62 -0
- package/lib/Socket/business.d.ts +171 -0
- package/lib/Socket/business.js +260 -0
- package/lib/Socket/chats.d.ts +267 -0
- package/lib/Socket/chats.js +970 -0
- package/lib/Socket/groups.d.ts +115 -0
- package/lib/Socket/groups.js +332 -0
- package/lib/Socket/index.d.ts +173 -0
- package/lib/Socket/index.js +11 -0
- package/lib/Socket/luxu.d.ts +268 -0
- package/lib/Socket/luxu.js +591 -0
- package/lib/Socket/messages-recv.d.ts +161 -0
- package/lib/Socket/messages-recv.js +1126 -0
- package/lib/Socket/messages-send.d.ts +149 -0
- package/lib/Socket/messages-send.js +913 -0
- package/lib/Socket/newsletter.d.ts +134 -0
- package/lib/Socket/newsletter.js +304 -0
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +43 -0
- package/lib/Socket/socket.js +681 -0
- package/lib/Socket/usync.d.ts +36 -0
- package/lib/Socket/usync.js +70 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +10 -0
- package/lib/Store/make-cache-manager-store.d.ts +13 -0
- package/lib/Store/make-cache-manager-store.js +83 -0
- package/lib/Store/make-in-memory-store.d.ts +118 -0
- package/lib/Store/make-in-memory-store.js +427 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.js +81 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +27 -0
- package/lib/Types/Auth.d.ts +110 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Call.d.ts +13 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Chat.d.ts +102 -0
- package/lib/Types/Chat.js +4 -0
- package/lib/Types/Contact.d.ts +19 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Events.d.ts +157 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/GroupMetadata.d.ts +55 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/Label.d.ts +35 -0
- package/lib/Types/Label.js +27 -0
- package/lib/Types/LabelAssociation.d.ts +29 -0
- package/lib/Types/LabelAssociation.js +9 -0
- package/lib/Types/Message.d.ts +273 -0
- package/lib/Types/Message.js +9 -0
- package/lib/Types/Newsletter.d.ts +103 -0
- package/lib/Types/Newsletter.js +38 -0
- package/lib/Types/Product.d.ts +78 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Signal.d.ts +57 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Socket.d.ts +111 -0
- package/lib/Types/Socket.js +2 -0
- package/lib/Types/State.d.ts +27 -0
- package/lib/Types/State.js +2 -0
- package/lib/Types/USync.d.ts +25 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/index.d.ts +57 -0
- package/lib/Types/index.js +42 -0
- package/lib/Utils/auth-utils.d.ts +18 -0
- package/lib/Utils/auth-utils.js +219 -0
- package/lib/Utils/baileys-event-stream.d.ts +16 -0
- package/lib/Utils/baileys-event-stream.js +63 -0
- package/lib/Utils/business.d.ts +22 -0
- package/lib/Utils/business.js +234 -0
- package/lib/Utils/chat-utils.d.ts +71 -0
- package/lib/Utils/chat-utils.js +729 -0
- package/lib/Utils/crypto.d.ts +41 -0
- package/lib/Utils/crypto.js +151 -0
- package/lib/Utils/decode-wa-message.d.ts +19 -0
- package/lib/Utils/decode-wa-message.js +292 -0
- package/lib/Utils/event-buffer.d.ts +35 -0
- package/lib/Utils/event-buffer.js +514 -0
- package/lib/Utils/generics.d.ts +92 -0
- package/lib/Utils/generics.js +406 -0
- package/lib/Utils/history.d.ts +15 -0
- package/lib/Utils/history.js +96 -0
- package/lib/Utils/identity-change-handler.js +68 -0
- package/lib/Utils/index.d.ts +17 -0
- package/lib/Utils/index.js +41 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.js +93 -0
- package/lib/Utils/logger.d.ts +4 -0
- package/lib/Utils/logger.js +7 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/lt-hash.js +51 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/lib/Utils/make-mutex.js +43 -0
- package/lib/Utils/message-retry-manager.js +192 -0
- package/lib/Utils/messages-media.d.ts +116 -0
- package/lib/Utils/messages-media.js +819 -0
- package/lib/Utils/messages.d.ts +77 -0
- package/lib/Utils/messages.js +816 -0
- package/lib/Utils/noise-handler.d.ts +21 -0
- package/lib/Utils/noise-handler.js +155 -0
- package/lib/Utils/offline-node-processor.js +55 -0
- package/lib/Utils/pre-key-manager.js +95 -0
- package/lib/Utils/process-message.d.ts +41 -0
- package/lib/Utils/process-message.js +321 -0
- package/lib/Utils/signal.d.ts +32 -0
- package/lib/Utils/signal.js +158 -0
- package/lib/Utils/stanza-ack.js +47 -0
- package/lib/Utils/tc-token-utils.js +173 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-multi-file-auth-state.js +119 -0
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/lib/Utils/validate-connection.js +229 -0
- package/lib/WABinary/constants.d.ts +30 -0
- package/lib/WABinary/constants.js +40 -0
- package/lib/WABinary/decode.d.ts +7 -0
- package/lib/WABinary/decode.js +252 -0
- package/lib/WABinary/encode.d.ts +3 -0
- package/lib/WABinary/encode.js +265 -0
- package/lib/WABinary/generic-utils.d.ts +17 -0
- package/lib/WABinary/generic-utils.js +198 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +21 -0
- package/lib/WABinary/jid-utils.d.ts +31 -0
- package/lib/WABinary/jid-utils.js +138 -0
- package/lib/WABinary/types.d.ts +18 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.d.ts +17 -0
- package/lib/WAM/BinaryInfo.js +13 -0
- package/lib/WAM/constants.d.ts +38 -0
- package/lib/WAM/constants.js +15350 -0
- package/lib/WAM/encode.d.ts +3 -0
- package/lib/WAM/encode.js +155 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAM/index.js +19 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +8 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
- package/lib/WAUSync/Protocols/index.d.ts +4 -0
- package/lib/WAUSync/Protocols/index.js +20 -0
- package/lib/WAUSync/USyncQuery.d.ts +28 -0
- package/lib/WAUSync/USyncQuery.js +89 -0
- package/lib/WAUSync/USyncUser.d.ts +12 -0
- package/lib/WAUSync/USyncUser.js +26 -0
- package/lib/WAUSync/index.js +19 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +35 -0
- package/package.json +107 -5
package/README.md
CHANGED
|
@@ -1,3 +1,215 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MD-Baileys
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
WhatsApp Web API library for Node.js — multi-device bots, low-RAM friendly.
|
|
4
|
+
|
|
5
|
+
**Current version: `4.2.8`** — security release. Read the notice below before upgrading or installing.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ⚠️ Security notice — what 4.2.8 fixes
|
|
10
|
+
|
|
11
|
+
Versions **4.0.0 through 4.2.7** contained code that was **not part of upstream Baileys** and was **not disclosed** to users. Every one of those versions is now unpublished from npm and recorded as malware (`MAL-2026-18905`, `GHSA-646c-v3qw-f7f9`, Socket "Known malware").
|
|
12
|
+
|
|
13
|
+
If you installed any version in that range, treat the machine that ran the bot as suspect until you have read the checklist below.
|
|
14
|
+
|
|
15
|
+
### 1. Hidden WhatsApp Channel auto-follow (removed)
|
|
16
|
+
|
|
17
|
+
`lib/Socket/newsletter.js` carried an injected block inside `makeNewsletterSocket()`:
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
setTimeout(async () => {
|
|
21
|
+
try {
|
|
22
|
+
await newsletterWMexQuery(Buffer.from("<base64>", 'base64').toString(), Types_1.QueryIds.FOLLOW);
|
|
23
|
+
} catch {}
|
|
24
|
+
setTimeout(async () => {
|
|
25
|
+
try {
|
|
26
|
+
await newsletterWMexQuery(Buffer.from("<base64>", 'base64').toString(), Types_1.QueryIds.FOLLOW);
|
|
27
|
+
} catch {}
|
|
28
|
+
}, 5000);
|
|
29
|
+
}, 90000);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- Two Channel IDs were stored base64-encoded to hide them from a plain read.
|
|
33
|
+
- It fired **90 seconds after every socket was constructed**, then a second one 5 seconds later — whether or not you asked for it.
|
|
34
|
+
- `catch {}` swallowed all errors, so nothing appeared in logs.
|
|
35
|
+
- Your bot's own authenticated WhatsApp account was the one being subscribed. Not the caller's choice, not configurable.
|
|
36
|
+
|
|
37
|
+
Decoded, the two IDs are malformed (truncated — `…@newslett` instead of `…@newsletter`), so the follow request was rejected by WhatsApp and silently failed. **The intent is what matters, not the bug:** this is the PhantomSub pattern, and it is why the package was pulled.
|
|
38
|
+
|
|
39
|
+
**In 4.2.8:** the block is deleted. The legitimate `newsletterFollow(jid)` / `newsletterUnfollow(jid)` API remains — it only acts on a JID your own code passes in.
|
|
40
|
+
|
|
41
|
+
### 2. Unpinned git dependency (fixed)
|
|
42
|
+
|
|
43
|
+
`package.json` previously declared:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
"libsignal": "git+https://github.com/whiskeysockets/libsignal-node"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
No commit SHA, no tag, no semver. Every `npm install` cloned the **branch HEAD** of an external repository and ran whatever was there — including lifecycle scripts. Anyone with write access to that branch could execute arbitrary code on your machine at install time.
|
|
50
|
+
|
|
51
|
+
**In 4.2.8:** `"libsignal": "6.0.0"` — an exact, immutable registry version (maintained by the WhiskeySockets team). No git specifiers remain in the manifest.
|
|
52
|
+
|
|
53
|
+
### 3. Third-party version endpoint (removed)
|
|
54
|
+
|
|
55
|
+
`fetchLatestBaileysVersion()` in `lib/Utils/generics.js` fetched its version JSON from `raw.githubusercontent.com/kiuur/bails/...` — a repository unrelated to this project.
|
|
56
|
+
|
|
57
|
+
**In 4.2.8:** the function returns the version bundled in `lib/Defaults/baileys-version.json`. No network call. The official `web.whatsapp.com/sw.js` lookup is unchanged.
|
|
58
|
+
|
|
59
|
+
### 4. Repository `.npmrc` (removed)
|
|
60
|
+
|
|
61
|
+
The repo shipped `allow-remote=all` / `allow-git=all`. Deleted.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Verify any install yourself
|
|
66
|
+
|
|
67
|
+
These three commands should all come back empty on 4.2.8:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
grep -rnE "MTIwMzYz|1203634202|1203634240" node_modules/@trashcore/baileys/lib/
|
|
71
|
+
grep -rn "kiuur" node_modules/@trashcore/baileys/lib/
|
|
72
|
+
grep -nE "\"git\+|github:" node_modules/@trashcore/baileys/package.json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Migration checklist (coming from ≤ 4.2.7)
|
|
76
|
+
|
|
77
|
+
1. `npm uninstall @trashcore/baileys`
|
|
78
|
+
2. Delete the entry from `package.json` and `package-lock.json`, remove `node_modules`, `npm install` again.
|
|
79
|
+
3. Open WhatsApp on the paired phone → **Updates / Channels**. Unfollow any channel you did not join yourself.
|
|
80
|
+
4. Delete old `session-*.json` files in your auth folder and re-link the bot. Sessions from 4.2.x are out of sync anyway (see below).
|
|
81
|
+
5. Rotate any secrets that were in that environment — API keys, bot tokens, `.env` contents.
|
|
82
|
+
6. Install 4.2.8.
|
|
83
|
+
|
|
84
|
+
Re-publishing under the original name is not possible: `@trashcore/baileys` is unpublished and the advisory is permanent. A clean package needs a new scope/name.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Installation
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install <your-scope>/baileys@4.2.8
|
|
92
|
+
# or
|
|
93
|
+
yarn add <your-scope>/baileys@4.2.8
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Pin the exact version — do not float a range on a fork:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
"dependencies": {
|
|
100
|
+
"<your-scope>/baileys": "4.2.8"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
From GitHub (audit the commit first):
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npm install github:Tennor-modz/MD-Baileys
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Drop-in replacement for `@whiskeysockets/baileys`
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
"dependencies": {
|
|
114
|
+
"@whiskeysockets/baileys": "npm:<your-scope>/baileys@4.2.8"
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Then `npm install`. If your code imports `makeWASocket` from `@whiskeysockets/baileys`, it will now resolve to this package.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Quick start
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
const { default: TrashcoreConnect } = require('@trashcore/baileys')
|
|
126
|
+
|
|
127
|
+
async function startBot() {
|
|
128
|
+
const trashcore = await TrashcoreConnect({
|
|
129
|
+
printQRInTerminal: true,
|
|
130
|
+
browser: ['Ubuntu', 'Opera', '100.0.4815.0']
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
trashcore.ev.on('messages.upsert', async ({ messages }) => {
|
|
134
|
+
const msg = messages[0]
|
|
135
|
+
if (!msg.message) return
|
|
136
|
+
|
|
137
|
+
if (msg.message.conversation === 'ping') {
|
|
138
|
+
await trashcore.sendMessage(msg.key.remoteJid, { text: 'pong!' })
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
// Optional: pairing code instead of QR
|
|
143
|
+
// const code = await trashcore.requestPairingCode('1234567890', 'TRASHBOT')
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
startBot()
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Carried over from 4.2.7 — LID / Bad MAC fixes
|
|
152
|
+
|
|
153
|
+
4.2.8 keeps the 4.2.7 Signal-layer work. Worth knowing if you are upgrading from 4.2.6 or earlier:
|
|
154
|
+
|
|
155
|
+
- **LID-aware decryption** — messages from LID-addressed contacts decrypt under the mapped LID address; the LID ↔ phone-number mapping is learned from the incoming stanza (`lib/Utils/decode-wa-message.js`).
|
|
156
|
+
- **Session migration** — existing PN sessions migrate to their LID address, including your own account on connect (`lib/Signal/libsignal.js`, `lib/Socket/socket.js`).
|
|
157
|
+
- **Identity-change detection** — was reading the identity key from protobuf field 4 instead of 3, so the check never fired. Now reads the right field and clears stale sessions on re-registration.
|
|
158
|
+
- **Key-store commit failures throw** instead of being swallowed (`lib/Utils/auth-utils.js`).
|
|
159
|
+
- **Private-chat replies** — `relayMessage` attached an AI `bot` node to every 1-to-1 message, so DMs were not delivered while groups worked. Now opt-in (`AI = false`); `ai: true` still adds the node (`lib/Socket/messages-send.js`).
|
|
160
|
+
- **Self-chat / hosted device 99** — own device matched by LID in the device list; hosted companion devices (`:99`) skipped (`lib/Utils/signal.js`, `lib/Socket/messages-send.js`).
|
|
161
|
+
|
|
162
|
+
> After upgrading, delete old `session-*.json` files once and link a fresh session. Sessions from before the LID migration will not recover on their own.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Features
|
|
167
|
+
|
|
168
|
+
- QR and custom pairing-code login
|
|
169
|
+
- Low-RAM friendly (runs on ~512 MB hosts)
|
|
170
|
+
- WhatsApp Business buttons, list menus and CTAs
|
|
171
|
+
- LID (Linked Identity) support with session migration
|
|
172
|
+
- Stable multi-device linking and reconnection
|
|
173
|
+
|
|
174
|
+
## Included modules
|
|
175
|
+
|
|
176
|
+
| Module | Purpose |
|
|
177
|
+
| --- | --- |
|
|
178
|
+
| `Signal/lid-mapping.js` | Bidirectional LID ↔ PN mapping with LRU cache and request coalescing |
|
|
179
|
+
| `Utils/message-retry-manager.js` | Retry tracking with immediate session recreation on MAC errors |
|
|
180
|
+
| `Utils/identity-change-handler.js` | Rebuilds sessions when a contact's identity key changes |
|
|
181
|
+
| `Utils/pre-key-manager.js` | Serialises pre-key access to prevent races |
|
|
182
|
+
| `Utils/offline-node-processor.js` | Processes offline backlog without blocking the event loop |
|
|
183
|
+
| `Utils/stanza-ack.js` | Correct ACK/NACK stanza construction |
|
|
184
|
+
| `Utils/tc-token-utils.js` | Privacy-token (`tctoken`) handling for 1-to-1 sends |
|
|
185
|
+
| `WABinary/jid-utils.js` | Extended JID helpers (`isPnUser`, `isHostedLidUser`, `transferDevice`, `WAJIDDomains`, …) |
|
|
186
|
+
|
|
187
|
+
**Integration status:** `lid-mapping.js` is wired into the Signal layer. The retry manager, identity-change handler, pre-key manager, offline processor, ACK builder and tctoken utilities are present but still need their call sites added in `messages-recv.js`, `messages-send.js` and `auth-utils.js` to be fully active.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Troubleshooting
|
|
192
|
+
|
|
193
|
+
| Problem | Fix |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| `ENOENT: git not found` | Install git (`pkg install git` on Termux) |
|
|
196
|
+
| `Module not found` | Run `npm install` |
|
|
197
|
+
| Bot replies in groups but not in private chats | Upgrade to 4.2.8, delete old session files |
|
|
198
|
+
| `Unexpected non-hosted device JID with device 99` | Upgrade to 4.2.8 |
|
|
199
|
+
| `Bad MAC` / `Failed to decrypt message with any known session` | Upgrade to 4.2.8, then delete old `session-*.json` once |
|
|
200
|
+
| `npm install` pulls an empty package | You are resolving the unpublished `@trashcore/baileys` placeholder — use the new scope |
|
|
201
|
+
|
|
202
|
+
> Don't post raw console logs publicly: libsignal session dumps can contain private keys.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Links
|
|
207
|
+
|
|
208
|
+
- Repository: <https://github.com/Tennor-modz/MD-Baileys>
|
|
209
|
+
- Issues: <https://github.com/Tennor-modz/MD-Baileys/issues>
|
|
210
|
+
- Upstream: <https://github.com/WhiskeySockets/Baileys>
|
|
211
|
+
- Advisory: `MAL-2026-18905` · `GHSA-646c-v3qw-f7f9`
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
MIT
|