@neelegirly/baileys 2.2.28 → 2.2.30

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/LICENSE CHANGED
@@ -1,6 +1,11 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Neele
3
+ Copyright (c) 2025 Rajeh Taher/WhiskeySockets (Baileys, upstream)
4
+ Copyright (c) 2025 Neele Girl (@neelegirly/baileys, fork)
5
+
6
+ This project is a fork of Baileys (https://github.com/WhiskeySockets/Baileys)
7
+ and contains substantial portions of that software. The upstream copyright
8
+ notice above is retained as required by the MIT license.
4
9
 
5
10
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
11
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -6,23 +6,41 @@
6
6
  ### *QR Branding · Self-Healing WA-Web-Version · Wrapper-Aware Update Notify · LID · Smart Queue*
7
7
 
8
8
  [![npm](https://img.shields.io/npm/v/%40neelegirly%2Fbaileys?style=for-the-badge&color=ff69b4&logo=npm)](https://www.npmjs.com/package/@neelegirly/baileys)
9
- [![wa-api](https://img.shields.io/badge/wa--api-1.8.10-c77dff?style=for-the-badge)](https://www.npmjs.com/package/@neelegirly/wa-api)
10
- [![libsignal](https://img.shields.io/badge/libsignal-1.0.32-f4a261?style=for-the-badge)](https://www.npmjs.com/package/@neelegirly/libsignal)
11
- [![WA-Web](https://img.shields.io/badge/WhatsApp--Web-2.3000.1035194821-25D366?style=for-the-badge&logo=whatsapp)](https://web.whatsapp.com)
9
+ [![wa-api](https://img.shields.io/badge/wa--api-1.8.13-c77dff?style=for-the-badge)](https://www.npmjs.com/package/@neelegirly/wa-api)
10
+ [![libsignal](https://img.shields.io/badge/libsignal-1.0.33-f4a261?style=for-the-badge)](https://www.npmjs.com/package/@neelegirly/libsignal)
11
+ [![WA-Web](https://img.shields.io/badge/WhatsApp--Web-2.3000.1043857760-25D366?style=for-the-badge&logo=whatsapp)](https://web.whatsapp.com)
12
12
  [![Node](https://img.shields.io/badge/Node-16+-4caf50?style=for-the-badge&logo=node.js)](https://nodejs.org)
13
13
 
14
14
  <p align="center">
15
15
  <img src="https://files.catbox.moe/5bqumy.jpeg" width="780" alt="@neelegirly/baileys Hero" />
16
16
  </p>
17
17
 
18
- <p align="center"><sub>2026 Glow-Up Edition · self-healing QR/Pairing · Companion-Stack auf <strong>2.2.26 / 1.8.10 / 1.0.32</strong></sub></p>
18
+ <p align="center"><sub>2026 Glow-Up Edition · self-healing QR/Pairing · Companion-Stack auf <strong>2.2.30 / 1.8.13 / 1.0.33</strong></sub></p>
19
19
 
20
- [**Installation**](#-installation) · [**Quickstart**](#-quickstart) · [**Was ist dieser Fork?**](#-was-ist-dieser-fork) · [**Versionsschema**](#-versionsschema) · [**Message-ID**](#-message-id-anpassung-neele) · [**Release Notes**](#-release-notes-2226)
20
+ [**Installation**](#-installation) · [**Quickstart**](#-quickstart) · [**Was ist dieser Fork?**](#-was-ist-dieser-fork) · [**Versionsschema**](#-versionsschema) · [**Message-ID**](#-message-id-anpassung-neele) · [**Release Notes**](#-release-notes-2230)
21
21
 
22
22
  </div>
23
23
 
24
24
  ---
25
25
 
26
+ > ### ⚠️ Das hier ist **NICHT** `WhiskeySockets/Baileys`
27
+ >
28
+ > `@neelegirly/baileys` ist ein **eigenständiger Fork**, gepflegt von **Neele Girl**.
29
+ > Eigene Versionszählung (`2.2.x`, **nicht** `6.7.x` / `7.x`), eigene Anpassungen:
30
+ > **Multi-Buttons** (`interactiveMessage` / `carouselMessage` / `nativeFlow`),
31
+ > **QR-/Pairing-Stabilität**, self-healing WA-Web-Version, eigene Message-ID-Signatur,
32
+ > `Store`-Layer und Mongo-/Single-File-Auth-States.
33
+ >
34
+ > Bug-Reports gehören zu **[neelegirly/baileys/issues](https://github.com/neelegirly/baileys/issues)** —
35
+ > **nicht** ins Upstream-Repo. Umgekehrt gilt: Upstream-Issues/PRs treffen auf diesen Fork
36
+ > oft nicht zu, weil er strukturell abweicht.
37
+ >
38
+ > Basiert auf **[Baileys](https://github.com/WhiskeySockets/Baileys)** von Rajeh Taher/WhiskeySockets,
39
+ > MIT-lizenziert — deren Copyright-Vermerk bleibt in der [LICENSE](LICENSE) erhalten. Danke für die Grundlage. 🌸
40
+ > Nicht offiziell mit WhatsApp, Meta oder dem Baileys-Upstream verbunden.
41
+
42
+ ---
43
+
26
44
  ## 🌷 Was ist dieser Fork?
27
45
 
28
46
  `@neelegirly/baileys` ist ein gepflegter **Fork von [Baileys](https://github.com/WhiskeySockets/Baileys)** (multi-device WhatsApp-Web-API für Node.js). Er bleibt nah am Upstream, ergänzt aber ein paar fokussierte Neelegirly-Eigenheiten:
@@ -61,8 +79,8 @@ Wichtig zu verstehen — hier laufen **zwei voneinander unabhängige** Versionsn
61
79
 
62
80
  | Nummer | Beispiel | Bedeutung |
63
81
  | --- | --- | --- |
64
- | **Fork-Version** | `2.2.26` | Die npm-Version *dieses Pakets*. Eigenes semver-Schema von Neelegirly – **nicht** identisch mit der Upstream-Baileys-Versionsnummer. |
65
- | **WhatsApp-Web-Baseline** | `2.3000.1035194821` | Die Client-Version, die im Handshake an WhatsApp gemeldet wird. Wird zur Laufzeit aktuell gehalten (self-healing). |
82
+ | **Fork-Version** | `2.2.30` | Die npm-Version *dieses Pakets*. Eigenes semver-Schema von Neelegirly – **nicht** identisch mit der Upstream-Baileys-Versionsnummer. |
83
+ | **WhatsApp-Web-Baseline** | `2.3000.1043857760` | Die Client-Version, die im Handshake an WhatsApp gemeldet wird. Wird zur Laufzeit aktuell gehalten (self-healing). |
66
84
 
67
85
  Die Fork-Version `2.2.x` ist also reines Paket-Versioning. Welche WhatsApp-Web-Version tatsächlich verbunden wird, zeigt der Boot-Banner und `fetchLatestBaileysVersion()`.
68
86
 
@@ -84,14 +102,14 @@ generateMessageID() // → z. B. "3AC18D8ANEELE3B14420"
84
102
  ## 🚀 Installation
85
103
 
86
104
  ```bash
87
- npm install @neelegirly/baileys@2.2.26 @neelegirly/libsignal@1.0.32 --save-exact
105
+ npm install @neelegirly/baileys@2.2.30 @neelegirly/libsignal@1.0.33 --save-exact
88
106
  ```
89
107
 
90
108
  ```bash
91
- yarn add @neelegirly/baileys@2.2.26 @neelegirly/libsignal@1.0.32 --exact
109
+ yarn add @neelegirly/baileys@2.2.30 @neelegirly/libsignal@1.0.33 --exact
92
110
  ```
93
111
 
94
- > Für den kompletten Stack passt dazu `@neelegirly/wa-api@1.8.10`.
112
+ > Für den kompletten Stack passt dazu `@neelegirly/wa-api@1.8.13`.
95
113
 
96
114
  ### Update eines bestehenden Setups
97
115
 
@@ -146,9 +164,9 @@ start().catch(console.error)
146
164
 
147
165
  | Paket | Version | Rolle |
148
166
  |------|---------|-------|
149
- | `@neelegirly/baileys` | `2.2.26` | Socket, Events, Messaging |
150
- | `@neelegirly/libsignal` | `1.0.32` | Signal-Protokoll-Komponente |
151
- | `@neelegirly/wa-api` | `1.8.10` | Lifecycle-, Session- und Update-Wrapper |
167
+ | `@neelegirly/baileys` | `2.2.30` | Socket, Events, Messaging |
168
+ | `@neelegirly/libsignal` | `1.0.33` | Signal-Protokoll-Komponente |
169
+ | `@neelegirly/wa-api` | `1.8.13` | Lifecycle-, Session- und Update-Wrapper |
152
170
 
153
171
  ---
154
172
 
@@ -167,13 +185,20 @@ Beim QR-Scan werden Markenzeilen ober- und unterhalb des QR-Codes ausgegeben. Ve
167
185
 
168
186
  ---
169
187
 
170
- ## 📝 Release Notes `2.2.26`
188
+ ## 📝 Release Notes `2.2.30`
189
+
190
+ - 🔧 **`fetchLatestWaWebVersion()` repariert.** Die Guard-Zeile las `match?.match[1]` statt `match?.[1]` und warf dadurch **bei jedem Aufruf** einen `TypeError`, der im `catch` verschwand. Die Funktion fiel deshalb *immer* still auf die eingebaute Baseline zurück und meldete `isLatest: false` — sie hat nie funktioniert. Jetzt liefert sie die echte Live-Version von `web.whatsapp.com/sw.js`.
191
+ - 📌 **WA-Web-Baseline aktualisiert** auf `2.3000.1043857760` (vorher `2.3000.1035194821`). Das ist nur der Offline-Notnagel: `fetchLatestBaileysVersion()` holt die Version weiterhin zur Laufzeit. Greift also, wenn beim Start kein Netz zur Versionsquelle besteht.
192
+ - ⚖️ **LICENSE korrigiert.** Der MIT-Copyright-Vermerk des Upstreams (Rajeh Taher/WhiskeySockets) war entfernt worden — MIT verlangt ihn aber bei substanziellen Teilen. Er steht jetzt wieder drin, neben dem Fork-Copyright.
193
+ - 🏷️ **Klarere Abgrenzung.** README-Kopf, `description` und `contributors` machen unmissverständlich, dass dies ein eigenständiger Fork von Neele Girl ist und **nicht** `WhiskeySockets/Baileys`.
194
+ - 🧷 **Message-ID- und QR-/Pairing-Logik unverändert.** Kein Byte an `generateMessageID` / `generateMessageIDV2` (`NEELE`-Signatur) oder am QR-/Pairing-Flow.
195
+ - 🔗 Companion-Stack: `2.2.30 / 1.8.13 / 1.0.33`.
171
196
 
172
- - 🛠️ **QR-/Pairing-Login repariert.** Die veraltete, hartcodierte WhatsApp-Web-Version führte zu `statusCode 405` ("Multi-device mismatch") und verhinderte jeden QR-Scan. Baseline auf `2.3000.1035194821` aktualisiert.
173
- - 🌐 **Self-Healing WA-Web-Version.** `fetchLatestBaileysVersion()` bezieht die Versionsangabe jetzt aus einer **gepflegten, immer aktuellen Quelle** statt aus einer toten URL (die zuvor mit `404` ins Leere lief und still eine veraltete Version pinnte). Künftige WhatsApp-Versions-Bumps heilen sich damit selbst.
174
- - 🧷 **Message-ID-Logik unverändert.** Die `NEELE`-Signatur in `generateMessageID` / `generateMessageIDV2` bleibt exakt erhalten.
175
- - 🪧 **Modernisierter Boot-Banner.** Zusätzliche, ehrliche Zeile mit der aktiven WhatsApp-Web-Baseline.
176
- - 🔗 Companion-Stack auf `2.2.26 / 1.8.10 / 1.0.32` aktualisiert.
197
+ > **Kein Upstream-Merge.** Dieser Fork weicht strukturell von `WhiskeySockets/Baileys` ab
198
+ > (eigener `Store`-Layer, `Socket/registration`, `WASignalGroup`, eigene Message-IDs; Upstream 7.x
199
+ > setzt inzwischen auf `whatsapp-rust-bridge` und hat `Store` entfernt). Ein mechanischer Merge
200
+ > würde den Fork zerlegen. Der einzige Punkt, der Logins wirklich bricht — die WhatsApp-Web-Version —
201
+ > wird zur Laufzeit self-healing nachgezogen.
177
202
 
178
203
  ---
179
204
 
@@ -1 +1 @@
1
- {"version":[2,3000,1035194821]}
1
+ {"version":[2,3000,1043857760]}
@@ -929,6 +929,18 @@ const makeMessagesRecvSocket = (config) => {
929
929
  ) {
930
930
  const deviceJids = devices.map((d) => d.attrs.jid);
931
931
  logger.info({ deviceJids }, "got my own devices");
932
+ } else if (child.attrs.jid) {
933
+ // OniSelf fork fix: a CONTACT changed devices. Force-refresh their
934
+ // device list (bypass the 5-min USER_DEVICES cache) so the next send
935
+ // reaches the new/changed device immediately instead of leaving it on
936
+ // WhatsApp's "Waiting for this message" until the cache expires.
937
+ // Benign + fail-safe: worst case is one extra usync query.
938
+ try {
939
+ await getUSyncDevices([child.attrs.jid], false, false);
940
+ logger.info({ jid: child.attrs.jid }, "refreshed contact devices after change");
941
+ } catch (e) {
942
+ logger.debug({ e }, "contact device refresh failed (non-fatal)");
943
+ }
932
944
  }
933
945
  break;
934
946
  case "server_sync":
@@ -424,8 +424,8 @@ const fetchLatestWaWebVersion = async (options) => {
424
424
  responseType: 'json'
425
425
  })
426
426
  const regex = /\\?"client_revision\\?":\s*(\d+)/
427
- const match = data.match(regex)
428
- if (!match?.match[1]) {
427
+ const match = String(data).match(regex)
428
+ if (!match?.[1]) {
429
429
  return {
430
430
  version: baileys_version_json_1.version,
431
431
  isLatest: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@neelegirly/baileys",
3
- "version": "2.2.28",
4
- "description": "Neelegirly fork of Baileys: multi-device WhatsApp Web API for Node.js",
3
+ "version": "2.2.30",
4
+ "description": "Eigenstaendiger Baileys-Fork von Neele Girl (NICHT WhiskeySockets/Baileys) — multi-device WhatsApp Web API fuer Node.js, mit Multi-Button-Support, QR-/Pairing-Stabilitaet und self-healing WA-Web-Version.",
5
5
  "keywords": [
6
6
  "whatsapp",
7
7
  "js-whatsapp",
@@ -20,7 +20,10 @@
20
20
  "url": "git+https://github.com/neelegirly/baileys.git"
21
21
  },
22
22
  "license": "MIT",
23
- "author": "neelegirly",
23
+ "author": "Neele Girl (neelegirly)",
24
+ "contributors": [
25
+ "Rajeh Taher/WhiskeySockets — Baileys upstream (https://github.com/WhiskeySockets/Baileys)"
26
+ ],
24
27
  "main": "lib/index.js",
25
28
  "module": "lib/index.js",
26
29
  "types": "lib/index.d.ts",