@neelegirl/baileys 2.1.5 → 2.1.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 CHANGED
@@ -1,215 +1,536 @@
1
- <div align="center">
1
+ <div align="center">
2
2
 
3
3
  # @neelegirl/baileys
4
4
 
5
- ### CJS-compatible WhatsApp Web API foundation for the Neelegirl ecosystem
5
+ ### CommonJS WhatsApp Web runtime for Neelegirl projects
6
+ ### Conservative merge strategy based on WhiskeySockets/Baileys
6
7
 
7
- [![Version](https://img.shields.io/badge/Version-2.1.5-ff69b4?style=for-the-badge)](https://www.npmjs.com/package/@neelegirl/baileys)
8
- [![Upstream](https://img.shields.io/badge/Upstream-WhiskeySockets%2FBaileys%207.0.0--rc.9-9b59b6?style=for-the-badge)](https://github.com/WhiskeySockets/Baileys)
9
- [![Node](https://img.shields.io/badge/Node-20%2B-2ea043?style=for-the-badge&logo=node.js)](https://nodejs.org)
10
- [![License](https://img.shields.io/badge/License-MIT-f97316?style=for-the-badge)](LICENSE)
8
+ [![npm version](https://img.shields.io/npm/v/@neelegirl/baileys?style=for-the-badge&color=ff69b4&logo=npm)](https://www.npmjs.com/package/@neelegirl/baileys)
9
+ [![node](https://img.shields.io/badge/node-%3E%3D20-2ea043?style=for-the-badge&logo=node.js)](https://nodejs.org)
10
+ [![license](https://img.shields.io/badge/license-MIT-f97316?style=for-the-badge)](LICENSE)
11
+ [![runtime](https://img.shields.io/badge/runtime-CommonJS-2563eb?style=for-the-badge)](https://www.npmjs.com/package/@neelegirl/baileys)
12
+ [![reference](https://img.shields.io/badge/reference-WhiskeySockets%2FBaileys-111827?style=for-the-badge)](https://github.com/WhiskeySockets/Baileys)
13
+
14
+ ---
11
15
 
12
16
  <p align="center">
13
- <img src="https://files.catbox.moe/phppor.JPG" width="760" alt="Neelegirl Baileys Header" />
17
+ <img src="https://files.catbox.moe/phppor.JPG" width="760" alt="@neelegirl/baileys" />
14
18
  </p>
15
19
 
16
- | Paket | Version | Basis |
20
+ | Package | Version | Main goal |
17
21
  |---|---:|---|
18
- | `@neelegirl/baileys` | `2.1.5` | `WhiskeySockets/Baileys v7.0.0-rc.9` |
22
+ | `@neelegirl/baileys` | `2.1.6` | Stable Neelegirl fork with preserved project-specific runtime behavior |
19
23
 
20
- [Installation](#installation) · [Quickstart](#quickstart) · [Funktionslogik](#funktionslogik) · [Aenderungen](#aenderungen--hinweise)
24
+ [Installation](#installation) · [Quickstart](#quickstart) · [Protected logic](#protected-logic) · [Device and LID notes](#device-and-lid-notes) · [Verified exports](#verified-exports) · [Release notes](#release-notes)
21
25
 
22
26
  </div>
23
27
 
24
28
  ---
25
29
 
26
- ## Inhaltsverzeichnis
30
+ ## Table of Contents
27
31
 
28
- - [Uebersicht](#uebersicht)
32
+ - [Overview](#overview)
33
+ - [Why this fork exists](#why-this-fork-exists)
34
+ - [Protected logic](#protected-logic)
35
+ - [What was updated in 2.1.6](#what-was-updated-in-216)
29
36
  - [Installation](#installation)
37
+ - [Imports](#imports)
30
38
  - [Quickstart](#quickstart)
31
- - [Funktionslogik](#funktionslogik)
32
- - [Aenderungen und Hinweise](#aenderungen--hinweise)
33
- - [libsignal im Stack](#libsignal-im-stack)
34
- - [Word2Web Hinweise](#word2web-hinweise)
35
- - [Kompatibilitaet und Grenzen](#kompatibilitaet-und-grenzen)
36
- - [Changelog](#changelog)
37
- - [Legal](#legal)
39
+ - [Session storage](#session-storage)
40
+ - [Socket configuration notes](#socket-configuration-notes)
41
+ - [Messages and media](#messages-and-media)
42
+ - [Device and LID notes](#device-and-lid-notes)
43
+ - [Event notes](#event-notes)
44
+ - [Verified exports](#verified-exports)
45
+ - [Known limits](#known-limits)
46
+ - [Release notes](#release-notes)
47
+ - [Disclaimer](#disclaimer)
38
48
 
39
- ---
49
+ ## Overview
40
50
 
41
- ## Uebersicht
51
+ `@neelegirl/baileys` is the local CommonJS-oriented Neelegirl fork of Baileys used in this stack. It is meant to keep existing Neelegirl-specific behavior stable while still absorbing compatible fixes from the public WhiskeySockets/Baileys project where that improves correctness.
42
52
 
43
- `@neelegirl/baileys` ist die CJS-orientierte Laufzeitbasis fuer das Neelegirl-Setup. Es uebernimmt die Socket-, Event-, Auth- und Message-Mechanik und bleibt dabei kompatibel zu bestehenden `require()`-Projekten.
53
+ This package was rechecked against the public WhiskeySockets/Baileys repository on `2026-03-19`. The merge strategy is conservative by design:
44
54
 
45
- Wichtige Punkte aus den bisherigen Projekt-READMEs, auf den echten Code gemappt:
55
+ - keep working Neelegirl runtime behavior
56
+ - adopt compatible fixes
57
+ - avoid blind upstream replacement
58
+ - avoid destructive refactors in project-critical paths
46
59
 
47
- - QR-Flow bleibt wie im Projekt vorgesehen erhalten.
48
- - Message-ID-Signatur mit `NEELE` bleibt erhalten.
49
- - LID/JID-bezogene Verarbeitung ist in den Socket/Signal-Pfaden aktiv.
50
- - npm-Update-Check ist enthalten (bei QR-Flow, nur einmal pro Prozess).
51
- - Aktuelle lokale WA-Web-Version: `[2, 3000, 1035194821]`.
60
+ ## Why this fork exists
52
61
 
53
- ---
62
+ The local package differs from upstream for practical reasons:
63
+
64
+ | Area | Intent |
65
+ |---|---|
66
+ | Module format | Keep CommonJS entrypoints and local consumer compatibility |
67
+ | QR flow | Preserve the existing project-specific QR behavior |
68
+ | Message IDs | Preserve `NEELE`-specific message-ID behavior |
69
+ | Device mapping | Keep project-specific platform and device labeling logic |
70
+ | Logging and watch behavior | Avoid breaking existing Neelegirl operational workflows |
71
+ | LID and JID handling | Extend carefully where current Baileys behavior improves compatibility |
72
+
73
+ ## Protected logic
74
+
75
+ The following logic was explicitly treated as protected during maintenance:
76
+
77
+ - QR-code generation and QR lifecycle
78
+ - `NEELE` message-ID generation and related custom handling
79
+ - existing Neelegirl branding and log output
80
+ - existing device, watch, and platform-specific behavior
81
+ - existing custom community and message-stub handling
82
+ - existing message-type behavior for conversation, extended text, media, and context handling
83
+
84
+ Nothing in those areas was blindly replaced with upstream code.
85
+
86
+ ## What was updated in 2.1.6
87
+
88
+ ### Runtime compatibility
89
+
90
+ - fixed the mismatch between `socket.js` expectations and the local Signal repository implementation
91
+ - added the missing runtime LID mapping store
92
+ - aligned session helpers required by the current local socket logic:
93
+ - `lidMapping`
94
+ - `validateSession`
95
+ - `deleteSession`
96
+ - `migrateSession`
97
+
98
+ ### History and identity handling
99
+
100
+ - history sync processing now collects `phoneNumberToLidMappings`
101
+ - inline bootstrap payloads are handled
102
+ - LID migration sync messages are processed conservatively
103
+ - session migration can now follow PN to LID transitions more cleanly
104
+
105
+ ### JID and device helpers
106
+
107
+ - restored and exposed helpers needed by newer Baileys compatibility work:
108
+ - `WAJIDDomains`
109
+ - `getServerFromDomainType`
110
+ - `isPnUser`
111
+ - `isJidMetaAI`
112
+ - `transferDevice`
113
+ - added a compatibility `browser-utils` re-export for `Browsers` and `getPlatformId`
114
+
115
+ ### Typings and docs
116
+
117
+ - refreshed multiple `.d.ts` files to match the actual current runtime more closely
118
+ - removed false README claims from older documentation
119
+ - replaced stale README imagery with the requested current project image
54
120
 
55
121
  ## Installation
56
122
 
123
+ Use npm:
124
+
57
125
  ```bash
58
126
  npm install @neelegirl/baileys
59
127
  ```
60
128
 
61
- Import:
129
+ Use yarn:
130
+
131
+ ```bash
132
+ yarn add @neelegirl/baileys
133
+ ```
134
+
135
+ Runtime requirement:
136
+
137
+ ```text
138
+ Node.js >= 20
139
+ ```
140
+
141
+ ## Imports
142
+
143
+ CommonJS:
62
144
 
63
145
  ```js
64
- // CommonJS
146
+ const makeWASocket = require('@neelegirl/baileys').default
65
147
  const {
66
- default: makeWASocket,
67
- useMultiFileAuthState,
68
- fetchLatestBaileysVersion,
69
- DisconnectReason,
70
148
  Browsers,
149
+ DisconnectReason,
150
+ fetchLatestBaileysVersion,
151
+ useMultiFileAuthState
71
152
  } = require('@neelegirl/baileys')
72
-
73
- // ESM (namespace import auf CJS-Export)
74
- import * as baileys from '@neelegirl/baileys'
75
153
  ```
76
154
 
77
- ---
155
+ ESM:
156
+
157
+ ```js
158
+ import makeWASocket, {
159
+ Browsers,
160
+ DisconnectReason,
161
+ fetchLatestBaileysVersion,
162
+ useMultiFileAuthState
163
+ } from '@neelegirl/baileys'
164
+ ```
78
165
 
79
166
  ## Quickstart
80
167
 
168
+ ### Start with QR
169
+
81
170
  ```js
171
+ const makeWASocket = require('@neelegirl/baileys').default
82
172
  const {
83
- default: makeWASocket,
84
- useMultiFileAuthState,
85
- fetchLatestBaileysVersion,
86
- DisconnectReason,
87
173
  Browsers,
174
+ DisconnectReason,
175
+ fetchLatestBaileysVersion,
176
+ useMultiFileAuthState
88
177
  } = require('@neelegirl/baileys')
89
178
 
90
- async function startBot() {
179
+ async function start() {
91
180
  const { state, saveCreds } = await useMultiFileAuthState('./auth_info')
92
181
  const { version } = await fetchLatestBaileysVersion()
93
182
 
94
183
  const sock = makeWASocket({
95
- auth: state,
96
184
  version,
97
- printQRInTerminal: true,
98
- browser: Browsers.ubuntu('Chrome'),
185
+ auth: state,
186
+ browser: Browsers.ubuntu('Neelegirl'),
187
+ printQRInTerminal: true
99
188
  })
100
189
 
101
190
  sock.ev.on('creds.update', saveCreds)
102
191
 
103
192
  sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
193
+ if (connection === 'open') {
194
+ console.log('connected')
195
+ }
196
+
104
197
  if (connection === 'close') {
105
198
  const code = lastDisconnect?.error?.output?.statusCode
106
- if (code !== DisconnectReason.loggedOut) {
107
- startBot()
199
+ const shouldReconnect = code !== DisconnectReason.loggedOut
200
+ if (shouldReconnect) {
201
+ start()
108
202
  }
109
- return
110
- }
111
-
112
- if (connection === 'open') {
113
- console.log('Connected to WhatsApp')
114
203
  }
115
204
  })
116
205
 
117
206
  sock.ev.on('messages.upsert', async ({ messages }) => {
118
- const msg = messages?.[0]
119
- const text = msg?.message?.conversation || msg?.message?.extendedTextMessage?.text || ''
120
- const jid = msg?.key?.remoteJid
121
- if (jid && text.toLowerCase() === 'ping') {
122
- await sock.sendMessage(jid, { text: 'pong' })
207
+ const msg = messages[0]
208
+ const text =
209
+ msg?.message?.conversation ||
210
+ msg?.message?.extendedTextMessage?.text ||
211
+ ''
212
+
213
+ if (text.toLowerCase() === 'ping') {
214
+ await sock.sendMessage(msg.key.remoteJid, { text: 'pong' })
123
215
  }
124
216
  })
125
217
  }
126
218
 
127
- startBot().catch(console.error)
219
+ start().catch(console.error)
128
220
  ```
129
221
 
130
- ---
222
+ ### Start with pairing code
131
223
 
132
- ## Funktionslogik
224
+ ```js
225
+ const makeWASocket = require('@neelegirl/baileys').default
226
+ const {
227
+ Browsers,
228
+ fetchLatestBaileysVersion,
229
+ useMultiFileAuthState
230
+ } = require('@neelegirl/baileys')
133
231
 
134
- ### Runtime und API
232
+ async function startPairing() {
233
+ const { state, saveCreds } = await useMultiFileAuthState('./auth_pairing')
234
+ const { version } = await fetchLatestBaileysVersion()
135
235
 
136
- - Exporte aus `lib/index.js`:
137
- - `default` / `makeWASocket`
138
- - `Utils`, `Types`, `Store`, `Defaults`, `WABinary`, `WAM`, `WAUSync`, `WAProto`
139
- - CJS-first Struktur (`main: lib/index.js`, `types: lib/index.d.ts`)
236
+ const sock = makeWASocket({
237
+ version,
238
+ auth: state,
239
+ browser: Browsers.windows('Neelegirl'),
240
+ printQRInTerminal: false
241
+ })
140
242
 
141
- ### Ereignisse und Verbindung
243
+ sock.ev.on('creds.update', saveCreds)
244
+
245
+ if (!sock.authState.creds.registered) {
246
+ const code = await sock.requestPairingCode('491234567890')
247
+ console.log('pairing code:', code)
248
+ }
249
+ }
142
250
 
143
- - `connection.update`, `messages.upsert`, `messages.update`, `creds.update`
144
- - QR wird ueber den normalen Connection-Update-Flow ausgegeben
145
- - Reconnect-Steuerung erfolgt ueber Disconnect-Grund (`DisconnectReason`)
251
+ startPairing().catch(console.error)
252
+ ```
146
253
 
147
- ### Auth und Session
254
+ ## Session storage
148
255
 
149
- - `useMultiFileAuthState` fuer persistente Session-Dateien
150
- - Signale/Keys laufen ueber die integrierten Signal-Utilities
256
+ For development, `useMultiFileAuthState(...)` is the easiest storage helper:
151
257
 
152
- ### Nachrichten und Hilfsfunktionen
258
+ ```js
259
+ const { state, saveCreds } = await useMultiFileAuthState('./auth_info')
260
+ ```
153
261
 
154
- - `sendMessage` fuer Text/Medien/reaktionen/polls usw.
155
- - Gruppen-, Community-, Newsletter- und Store-Utilities sind enthalten
156
- - LID/JID-Helfer (`jidDecode`, `jidEncode`, `isLidUser`) stehen ueber die Utility-Exports zur Verfuegung
262
+ The package also exports:
157
263
 
158
- ---
264
+ - `useSingleFileAuthState`
265
+ - `useMongoFileAuthState`
266
+ - `makeInMemoryStore`
159
267
 
160
- ## Aenderungen & Hinweise
268
+ If you build a custom store, the critical rule is simple:
161
269
 
162
- Diese README uebernimmt die Dokumentationslogik aus den zwei Quell-READMEs und passt sie auf den realen Paketstand an:
270
+ - credential updates must be persisted
271
+ - key updates must be persisted
272
+ - ignoring key-store updates will eventually break message delivery
163
273
 
164
- - Funktionale Beschreibungen wurden beibehalten und auf echte Exporte reduziert.
165
- - Historische Hinweise wurden bereinigt, wenn sie veraltete Versionen nannten.
166
- - Keine nicht nachweisbaren Features aufgenommen.
274
+ ## Socket configuration notes
167
275
 
168
- Technisch relevante Punkte:
276
+ Useful socket options that remain especially relevant in this fork:
169
277
 
170
- - QR-Logik unveraendert belassen.
171
- - `NEELE`-Message-ID-Signatur unveraendert belassen.
172
- - Update-Check auf npm-Registry aktiv.
173
- - WA-Web-Version-Datei auf aktuellen lokalen Stand aktualisiert.
278
+ | Option | Why it matters |
279
+ |---|---|
280
+ | `auth` | required session state |
281
+ | `version` | WA Web version selection |
282
+ | `browser` | affects platform/device presentation |
283
+ | `printQRInTerminal` | keeps the existing QR path active |
284
+ | `markOnlineOnConnect` | controls online presence behavior |
285
+ | `syncFullHistory` | enables broader history sync requests |
286
+ | `getMessage` | improves retry and message recovery scenarios |
287
+ | `cachedGroupMetadata` | avoids repeated group fetches |
174
288
 
175
- ---
289
+ Example:
176
290
 
177
- ## libsignal im Stack
291
+ ```js
292
+ const sock = makeWASocket({
293
+ version,
294
+ auth: state,
295
+ browser: Browsers.macOS('Desktop'),
296
+ printQRInTerminal: true,
297
+ markOnlineOnConnect: false,
298
+ syncFullHistory: true,
299
+ getMessage: async (key) => {
300
+ return store.loadMessage(key.remoteJid, key.id)
301
+ },
302
+ cachedGroupMetadata: async (jid) => groupCache.get(jid)
303
+ })
304
+ ```
178
305
 
179
- `@neelegirl/baileys` nutzt `@neelegirl/libsignal` fuer kryptografische Session-Bausteine (Identity, PreKeys, SessionState, Cipher-Operationen). Das ist die Grundlage fuer stabile Multi-Device-Kommunikation.
306
+ ## Messages and media
180
307
 
181
- ---
308
+ ### Send a text message
182
309
 
183
- ## Word2Web Hinweise
310
+ ```js
311
+ await sock.sendMessage(jid, { text: 'hello' })
312
+ ```
184
313
 
185
- Es gibt in diesem Paket kein dediziertes Word2Web-Modul. Word2Web-spezifische Logik sollte nur dokumentiert/aktiviert werden, wenn sie in deiner Host-Anwendung wirklich implementiert ist.
314
+ ### Reply to a message
186
315
 
187
- ---
316
+ ```js
317
+ await sock.sendMessage(
318
+ jid,
319
+ { text: 'this is a reply' },
320
+ { quoted: originalMessage }
321
+ )
322
+ ```
323
+
324
+ ### Send an image
188
325
 
189
- ## Kompatibilitaet und Grenzen
326
+ ```js
327
+ await sock.sendMessage(jid, {
328
+ image: { url: './image.jpg' },
329
+ caption: 'sample'
330
+ })
331
+ ```
190
332
 
191
- - Node.js: `>=20`
192
- - CJS-fokussiert, nicht als 1:1-ESM-Upstream-Ersatz dokumentiert
193
- - Die API ist auf bestehende Neelegirl-Consumer ausgerichtet
333
+ ### Send a document
194
334
 
195
- ---
335
+ ```js
336
+ await sock.sendMessage(jid, {
337
+ document: { url: './report.pdf' },
338
+ mimetype: 'application/pdf',
339
+ fileName: 'report.pdf'
340
+ })
341
+ ```
196
342
 
197
- ## Changelog
343
+ ### Send a reaction
198
344
 
199
- ### 2.1.5
345
+ ```js
346
+ await sock.sendMessage(jid, {
347
+ react: {
348
+ text: '❤',
349
+ key: message.key
350
+ }
351
+ })
352
+ ```
353
+
354
+ ### Download received media
200
355
 
201
- - README inhaltlich mit den Desktop-Quellen zusammengefuehrt (ohne blindes Kopieren)
202
- - Funktionsbeschreibungen, Nutzungslogik und technische Hinweise auf realen Paketstand gemappt
203
- - Versions- und Abhaengigkeitsabgleich im Neelegirl-Stack aktualisiert
204
- - QR-Flow und `NEELE`-Message-ID-Verhalten unveraendert beibehalten
356
+ ```js
357
+ const { downloadMediaMessage } = require('@neelegirl/baileys')
358
+
359
+ const buffer = await downloadMediaMessage(
360
+ message,
361
+ 'buffer',
362
+ {},
363
+ { logger: sock.logger, reuploadRequest: sock.updateMediaMessage }
364
+ )
365
+ ```
205
366
 
206
- ### 2.1.4
367
+ ## Device and LID notes
207
368
 
208
- - Style-/Layout-Refresh fuer konsistente Projektdokumentation
209
- - Publish-Metadaten und CJS-Kompatibilitaet nachgezogen
369
+ This fork intentionally does more than just plain PN handling.
210
370
 
211
- ---
371
+ ### Relevant helper exports
372
+
373
+ - `jidDecode`
374
+ - `jidEncode`
375
+ - `jidNormalizedUser`
376
+ - `isPnUser`
377
+ - `isLidUser`
378
+ - `isHostedPnUser`
379
+ - `isHostedLidUser`
380
+ - `transferDevice`
381
+ - `WAJIDDomains`
382
+
383
+ ### Example: inspect a JID
384
+
385
+ ```js
386
+ const { jidDecode } = require('@neelegirl/baileys')
387
+
388
+ const decoded = jidDecode('491234567890@s.whatsapp.net')
389
+ console.log(decoded)
390
+ ```
391
+
392
+ ### Example: preserve device while switching identity space
393
+
394
+ ```js
395
+ const { transferDevice } = require('@neelegirl/baileys')
396
+
397
+ const result = transferDevice(
398
+ '491234567890:5@s.whatsapp.net',
399
+ '1234567890@lid'
400
+ )
401
+ ```
402
+
403
+ ### Why this matters here
404
+
405
+ Neelegirl-specific code in this package already relies on richer identity handling around:
406
+
407
+ - `remoteJid`
408
+ - `remoteJidAlt`
409
+ - `participant`
410
+ - `participantAlt`
411
+ - sender normalization
412
+ - PN and LID mapping
413
+ - device labeling output
414
+
415
+ That is why the maintenance work kept those paths intact and only extended compatibility where necessary.
416
+
417
+ ## Event notes
418
+
419
+ Useful events in the current runtime:
420
+
421
+ ### Connection lifecycle
422
+
423
+ - `connection.update`
424
+ - `creds.update`
425
+
426
+ ### Message flow
427
+
428
+ - `messages.upsert`
429
+ - `messages.update`
430
+ - `messages.reaction`
431
+ - `message-receipt.update`
432
+
433
+ ### History and metadata
434
+
435
+ - `messaging-history.set`
436
+ - `contacts.upsert`
437
+ - `contacts.update`
438
+ - `chats.update`
439
+
440
+ ### Group and community related
441
+
442
+ - `groups.update`
443
+ - `group-participants.update`
444
+ - `group.join-request`
445
+ - `group.member-tag.update`
446
+ - `communities.update`
447
+
448
+ ### Example
449
+
450
+ ```js
451
+ sock.ev.on('messaging-history.set', ({ chats, contacts, messages, lidPnMappings }) => {
452
+ console.log({
453
+ chats: chats.length,
454
+ contacts: contacts.length,
455
+ messages: messages.length,
456
+ lidPnMappings: lidPnMappings?.length || 0
457
+ })
458
+ })
459
+ ```
460
+
461
+ ## Verified exports
462
+
463
+ The following items were verified in the currently prepared package before publish.
464
+
465
+ ### Socket and auth
466
+
467
+ - `makeWASocket`
468
+ - `useMultiFileAuthState`
469
+ - `useSingleFileAuthState`
470
+ - `useMongoFileAuthState`
471
+ - `makeInMemoryStore`
472
+
473
+ ### Version and browser helpers
474
+
475
+ - `fetchLatestBaileysVersion`
476
+ - `fetchLatestWaWebVersion`
477
+ - `Browsers`
478
+ - `getPlatformId`
479
+
480
+ ### JID and identity helpers
481
+
482
+ - `jidDecode`
483
+ - `jidEncode`
484
+ - `jidNormalizedUser`
485
+ - `isPnUser`
486
+ - `isLidUser`
487
+ - `isHostedPnUser`
488
+ - `isHostedLidUser`
489
+ - `isJidMetaAI`
490
+ - `transferDevice`
491
+ - `WAJIDDomains`
492
+
493
+ ### Message and media helpers
494
+
495
+ - `downloadMediaMessage`
496
+ - `downloadAndProcessHistorySyncNotification`
497
+ - `processHistoryMessage`
498
+ - `getHistoryMsg`
499
+ - `getContentType`
500
+ - `normalizeMessageContent`
501
+ - `generateWAMessage`
502
+ - `generateWAMessageContent`
503
+ - `generateWAMessageFromContent`
504
+
505
+ ### USync helpers
506
+
507
+ - `USyncQuery`
508
+ - `USyncUser`
509
+ - `USyncContactProtocol`
510
+ - `USyncLIDProtocol`
511
+ - `USyncDeviceProtocol`
512
+ - `USyncStatusProtocol`
513
+
514
+ ## Known limits
515
+
516
+ - this package is not a direct one-to-one mirror of every newest upstream internal API
517
+ - no restrictive `exports` map was added because that would risk breaking existing CommonJS consumers
518
+ - some upstream files remain intentionally absent because the local Neelegirl fork structure differs by design
519
+
520
+ ## Release notes
521
+
522
+ ### 2.1.6
523
+
524
+ - restored runtime consistency between socket logic and Signal repository behavior
525
+ - added local LID mapping store support
526
+ - improved history sync processing for LID and PN mapping capture
527
+ - added current JID helper compatibility exports
528
+ - refreshed typings and README without touching protected QR and `NEELE` logic
529
+
530
+ ### 2.1.5
531
+
532
+ - previous local package baseline before the current conservative maintenance pass
212
533
 
213
- ## Legal
534
+ ## Disclaimer
214
535
 
215
- Dieses Projekt ist nicht mit WhatsApp verbunden. Nutzung nur in Uebereinstimmung mit geltendem Recht und Plattformregeln.
536
+ This project is not affiliated with WhatsApp. Use it responsibly. Do not use it for spam, stalking, or abusive automation.
@@ -1,4 +1,9 @@
1
- import { SignalAuthState } from '../Types'
2
- import { SignalRepository } from '../Types/Signal'
1
+ import { LIDMapping, SignalAuthState } from '../Types'
2
+ import { SignalRepositoryWithLIDStore } from '../Types/Signal'
3
+ import type { ILogger } from '../Utils/logger'
3
4
 
4
- export declare function makeLibSignalRepository(auth: SignalAuthState): SignalRepository
5
+ export declare function makeLibSignalRepository(
6
+ auth: SignalAuthState,
7
+ logger: ILogger,
8
+ pnToLIDFunc?: (jids: string[]) => Promise<LIDMapping[] | undefined>
9
+ ): SignalRepositoryWithLIDStore