xspacesocket 1.3.0 → 1.3.1
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 +62 -6
- package/package.json +3 -6
package/README.md
CHANGED
|
@@ -1,25 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# xspacesocket
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
`xspacesocket` is a [Baileys](https://github.com/WhiskeySockets/Baileys) fork maintained by **XCASPER SPACE**. It preserves the upstream API while adding polls and poll voting, channels, app-state controls, view-once recovery, native buttons, and more.
|
|
6
|
+
> **Migrating from `whiskeysockets/baileys`?** You do **not** need to rename your imports. npm uses the dependency key in your `package.json` as the import name, so change one line to the npm alias and your existing imports keep working unchanged:
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
"@whiskeysockets/baileys": "npm:xspacesocket"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
If your bot imports from `'baileys'`, use `"baileys": "npm:xspacesocket"` instead. Aliases only work for registry packages, not git dependencies.
|
|
13
|
+
|
|
14
|
+
- **npm:** https://www.npmjs.com/package/xspacesocket
|
|
15
|
+
- **Source:** https://gitlab.com/Casper-Tech-ke/baileys
|
|
16
|
+
- **Changelog:** [CHANGELOG.md](./CHANGELOG.md)
|
|
17
|
+
- **License:** [LICENSE](./LICENSE) (MIT)
|
|
4
18
|
|
|
5
19
|
## Installation
|
|
6
20
|
|
|
7
21
|
```bash
|
|
8
|
-
npm install
|
|
22
|
+
npm install xspacesocket
|
|
9
23
|
```
|
|
10
24
|
|
|
11
25
|
The package is ESM and requires Node.js 20 or newer.
|
|
12
26
|
|
|
27
|
+
New users import from `'xspacesocket'` (see Quick start). If you are migrating from `whiskeysockets/baileys`, use the npm alias in the note above instead. Your imports stay as they are.
|
|
28
|
+
|
|
29
|
+
### Install from GitLab
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
"baileys": "git+https://gitlab.com/Casper-Tech-ke/baileys.git#main"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or install it directly:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install git+https://gitlab.com/Casper-Tech-ke/baileys.git#main
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Your imports stay as `'baileys'`, since the dependency key is the import name.
|
|
42
|
+
|
|
13
43
|
## Quick start
|
|
14
44
|
|
|
15
45
|
```js
|
|
16
|
-
import makeWASocket, { useMultiFileAuthState } from '
|
|
46
|
+
import makeWASocket, { useMultiFileAuthState } from 'xspacesocket'
|
|
17
47
|
|
|
18
48
|
const { state, saveCreds } = await useMultiFileAuthState('auth_info')
|
|
19
49
|
const sock = makeWASocket({ auth: state })
|
|
20
50
|
sock.ev.on('creds.update', saveCreds)
|
|
21
51
|
```
|
|
22
52
|
|
|
53
|
+
## Features
|
|
54
|
+
|
|
55
|
+
- **Polls & poll voting** — quiz and timed polls, poll add-option, and `sendPollVote` by option name with the LID voter-id fix.
|
|
56
|
+
- **Channels** — channel status publishing and management, channel poll voting, scheduled posts, status responses, view receipts, and directory search; newsletter status send, react, revoke, and fetch.
|
|
57
|
+
- **App-state controls** — pin and unpin chats and messages (with pin safety for messages that do not exist), archive chats, personal and Close Friends statuses, status audience (contacts, allow list, deny list, Close Friends), all eight privacy settings, status viewing and reactions, and automatic sync-key resolve on fresh sessions.
|
|
58
|
+
- **View-once recovery** — V2 envelope, `downloadViewOnceMessage` and `extractViewOnceMedia`, with reupload-first when media has a key but no URL.
|
|
59
|
+
- **Native interactive buttons** — `cta_url`, `cta_copy`, `quick_reply`, `single_select`, and `cta_call`, with media headers and offer banners.
|
|
60
|
+
- **Contacts** — `addOrEditContact` and `removeContact` (WhatsApp contacts only, not the phone address book).
|
|
61
|
+
- **Member tag & sticker packs** — member tag text and `group-participants.update`, sticker pack publisher, cover, and hash.
|
|
62
|
+
- **Group status** — `sendGroupStatus` for text, image, video, audio, and sticker, with link previews on text statuses.
|
|
63
|
+
- **Group history** — `sendGroupHistory`, the E2EE history bundle for new members.
|
|
64
|
+
- **Native Markdown tables** — the `markdownTable` message property, `parseMarkdownTables`, and `markdownToAIRichResponse`.
|
|
65
|
+
- **Article cards** — `sendArticleCard` external-ad reply cards.
|
|
66
|
+
- **Enhanced sticker fields** — `isAiSticker`, `isAvatar`, `isLottie`, and `accessibilityLabel`.
|
|
67
|
+
- **Core WhatsApp Web** — the full upstream Baileys API: messages, groups, calls, presence, auth, and pairing codes.
|
|
68
|
+
|
|
23
69
|
## Native Markdown tables
|
|
24
70
|
|
|
25
71
|
Send an AI response containing Markdown pipe tables through `markdownTable`. WhatsApp renders each detected table with its native rich-table interface while preserving surrounding prose.
|
|
@@ -52,7 +98,7 @@ Supported behavior:
|
|
|
52
98
|
The lower-level helpers are also exported:
|
|
53
99
|
|
|
54
100
|
```js
|
|
55
|
-
import { parseMarkdownTables, markdownToAIRichResponse } from '
|
|
101
|
+
import { parseMarkdownTables, markdownToAIRichResponse } from 'xspacesocket'
|
|
56
102
|
|
|
57
103
|
const submessages = parseMarkdownTables(markdown, { title: 'Results' })
|
|
58
104
|
const richResponse = markdownToAIRichResponse(markdown, { title: 'Results' })
|
|
@@ -133,12 +179,22 @@ These fields do not convert a WebP file into WhatsApp's signed premium `applicat
|
|
|
133
179
|
- Adds `sock.sendGroupStatus()` for text and media group-status updates.
|
|
134
180
|
- Adds Markdown-to-native-table parsing through the `markdownTable` message property.
|
|
135
181
|
- Adds `sock.sendArticleCard()` for external-ad reply article cards.
|
|
182
|
+
- Adds polls and poll voting: quiz and timed polls, poll add-option, and `sendPollVote` with the LID voter-id fix.
|
|
183
|
+
- Adds channel status and polls, scheduled posts, status responses, view receipts, and directory search.
|
|
184
|
+
- Adds app-state controls: pin chats and messages, archive, personal and Close Friends status, privacy settings, and status audience.
|
|
185
|
+
- Adds view-once recovery with `downloadViewOnceMessage` and `extractViewOnceMedia`.
|
|
186
|
+
- Adds native interactive buttons (`cta_url`, `cta_copy`, `quick_reply`, `single_select`, `cta_call`).
|
|
187
|
+
- Adds contact controls (`addOrEditContact`, `removeContact`), member tag text, sticker pack fields, and `sendGroupHistory`.
|
|
136
188
|
- Exports `parseMarkdownTables()` and `markdownToAIRichResponse()`.
|
|
137
189
|
- Supports enhanced sticker protobuf fields.
|
|
138
190
|
- Fixes media stanza detection required by group-status messages.
|
|
139
191
|
|
|
140
192
|
All other standard Baileys APIs remain available.
|
|
141
193
|
|
|
194
|
+
## Changelog
|
|
195
|
+
|
|
196
|
+
See [CHANGELOG.md](./CHANGELOG.md) for the full version history.
|
|
197
|
+
|
|
142
198
|
## License
|
|
143
199
|
|
|
144
|
-
MIT. See [LICENSE](./LICENSE). The original Baileys copyright notice is preserved. Modifications by
|
|
200
|
+
MIT. See [LICENSE](./LICENSE). The original Baileys copyright notice is preserved. Modifications by XCASPER SPACE are licensed under the same terms.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xspacesocket",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
5
|
-
"description": "CASPER-TECH-KE Baileys
|
|
4
|
+
"version": "1.3.1",
|
|
5
|
+
"description": "CASPER-TECH-KE Baileys — WhatsApp Web library with report/block, polls and poll voting, channel status and polls, app-state controls, view-once recovery, native buttons, and group status.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"whatsapp",
|
|
8
8
|
"automation",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@hapi/boom": "^9.1.3",
|
|
50
50
|
"@types/qrcode-terminal": "^0.12.2",
|
|
51
51
|
"async-mutex": "^0.5.0",
|
|
52
|
+
"jimp": "0.16.3",
|
|
52
53
|
"libsignal": "^6.0.0",
|
|
53
54
|
"link-preview-js": "^4.0.4",
|
|
54
55
|
"lru-cache": "^11.1.0",
|
|
@@ -94,7 +95,6 @@
|
|
|
94
95
|
},
|
|
95
96
|
"peerDependencies": {
|
|
96
97
|
"audio-decode": "^2.1.3",
|
|
97
|
-
"jimp": "^0.16.3",
|
|
98
98
|
"sharp": "*"
|
|
99
99
|
},
|
|
100
100
|
"resolutions": {
|
|
@@ -129,9 +129,6 @@
|
|
|
129
129
|
"peerDependenciesMeta": {
|
|
130
130
|
"audio-decode": {
|
|
131
131
|
"optional": true
|
|
132
|
-
},
|
|
133
|
-
"jimp": {
|
|
134
|
-
"optional": true
|
|
135
132
|
}
|
|
136
133
|
},
|
|
137
134
|
"packageManager": "yarn@4.9.2",
|