wolfsocket 1.0.6 → 1.0.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 +144 -144
- package/WAProto/WAProto.proto +10 -1
- package/WAProto/index.d.ts +26 -0
- package/WAProto/index.js +18415 -8908
- package/lib/Defaults/index.d.ts +6 -0
- package/lib/Defaults/index.d.ts.map +1 -1
- package/lib/Defaults/index.js +18 -1
- package/lib/Defaults/index.js.map +1 -1
- package/lib/Signal/lid-mapping.js +1 -1
- package/lib/Signal/lid-mapping.js.map +1 -1
- package/lib/Socket/business.d.ts +174 -6
- package/lib/Socket/business.d.ts.map +1 -1
- package/lib/Socket/channelPollVote.d.ts +44 -0
- package/lib/Socket/channelPollVote.d.ts.map +1 -0
- package/lib/Socket/channelPollVote.js +65 -0
- package/lib/Socket/channelPollVote.js.map +1 -0
- package/lib/Socket/channelSchedule.d.ts +229 -0
- package/lib/Socket/channelSchedule.d.ts.map +1 -0
- package/lib/Socket/channelSchedule.js +465 -0
- package/lib/Socket/channelSchedule.js.map +1 -0
- package/lib/Socket/channelStatus.d.ts +317 -0
- package/lib/Socket/channelStatus.d.ts.map +1 -0
- package/lib/Socket/channelStatus.js +479 -0
- package/lib/Socket/channelStatus.js.map +1 -0
- package/lib/Socket/chats.d.ts +30 -5
- package/lib/Socket/chats.d.ts.map +1 -1
- package/lib/Socket/chats.js +117 -2
- package/lib/Socket/chats.js.map +1 -1
- package/lib/Socket/communities.d.ts +176 -7
- package/lib/Socket/communities.d.ts.map +1 -1
- package/lib/Socket/communities.js +22 -6
- package/lib/Socket/communities.js.map +1 -1
- package/lib/Socket/groupHistory.d.ts +38 -0
- package/lib/Socket/groupHistory.d.ts.map +1 -0
- package/lib/Socket/groupHistory.js +88 -0
- package/lib/Socket/groupHistory.js.map +1 -0
- package/lib/Socket/groupStatus.d.ts +6 -0
- package/lib/Socket/groupStatus.d.ts.map +1 -1
- package/lib/Socket/groupStatus.js +19 -3
- package/lib/Socket/groupStatus.js.map +1 -1
- package/lib/Socket/groups.d.ts +11 -5
- package/lib/Socket/groups.d.ts.map +1 -1
- package/lib/Socket/groups.js +9 -2
- package/lib/Socket/groups.js.map +1 -1
- package/lib/Socket/index.d.ts +174 -6
- package/lib/Socket/index.d.ts.map +1 -1
- package/lib/Socket/messages-recv.d.ts +174 -6
- package/lib/Socket/messages-recv.d.ts.map +1 -1
- package/lib/Socket/messages-recv.js +152 -34
- package/lib/Socket/messages-recv.js.map +1 -1
- package/lib/Socket/messages-send.d.ts +211 -8
- package/lib/Socket/messages-send.d.ts.map +1 -1
- package/lib/Socket/messages-send.js +510 -133
- package/lib/Socket/messages-send.js.map +1 -1
- package/lib/Socket/newsletter.d.ts +11 -5
- package/lib/Socket/newsletter.d.ts.map +1 -1
- package/lib/Socket/newsletterDirectory.d.ts +201 -0
- package/lib/Socket/newsletterDirectory.d.ts.map +1 -0
- package/lib/Socket/newsletterDirectory.js +291 -0
- package/lib/Socket/newsletterDirectory.js.map +1 -0
- package/lib/Socket/payment.d.ts +37 -0
- package/lib/Socket/payment.d.ts.map +1 -0
- package/lib/Socket/payment.js +124 -0
- package/lib/Socket/payment.js.map +1 -0
- package/lib/Socket/report.d.ts +70 -0
- package/lib/Socket/report.d.ts.map +1 -0
- package/lib/Socket/report.js +265 -0
- package/lib/Socket/report.js.map +1 -0
- package/lib/Socket/socket.d.ts.map +1 -1
- package/lib/Socket/socket.js +17 -5
- package/lib/Socket/socket.js.map +1 -1
- package/lib/Socket/stickerPack.d.ts +29 -0
- package/lib/Socket/stickerPack.d.ts.map +1 -0
- package/lib/Socket/stickerPack.js +130 -0
- package/lib/Socket/stickerPack.js.map +1 -0
- package/lib/Socket/username.d.ts +55 -0
- package/lib/Socket/username.d.ts.map +1 -0
- package/lib/Socket/username.js +114 -0
- package/lib/Socket/username.js.map +1 -0
- package/lib/Types/ChannelStatus.d.ts +34 -0
- package/lib/Types/ChannelStatus.d.ts.map +1 -0
- package/lib/Types/ChannelStatus.js +2 -0
- package/lib/Types/ChannelStatus.js.map +1 -0
- package/lib/Types/Chat.d.ts +17 -0
- package/lib/Types/Chat.d.ts.map +1 -1
- package/lib/Types/Chat.js.map +1 -1
- package/lib/Types/Events.d.ts +4 -0
- package/lib/Types/Events.d.ts.map +1 -1
- package/lib/Types/GroupMetadata.d.ts +2 -0
- package/lib/Types/GroupMetadata.d.ts.map +1 -1
- package/lib/Types/Message.d.ts +123 -3
- package/lib/Types/Message.d.ts.map +1 -1
- package/lib/Types/Payment.d.ts +47 -0
- package/lib/Types/Payment.d.ts.map +1 -0
- package/lib/Types/Payment.js +2 -0
- package/lib/Types/Payment.js.map +1 -0
- package/lib/Types/Report.d.ts +219 -0
- package/lib/Types/Report.d.ts.map +1 -0
- package/lib/Types/Report.js +166 -0
- package/lib/Types/Report.js.map +1 -0
- package/lib/Types/StickerPack.d.ts +52 -0
- package/lib/Types/StickerPack.d.ts.map +1 -0
- package/lib/Types/StickerPack.js +2 -0
- package/lib/Types/StickerPack.js.map +1 -0
- package/lib/Types/Username.d.ts +19 -0
- package/lib/Types/Username.d.ts.map +1 -0
- package/lib/Types/Username.js +2 -0
- package/lib/Types/Username.js.map +1 -0
- package/lib/Types/index.d.ts +5 -0
- package/lib/Types/index.d.ts.map +1 -1
- package/lib/Types/index.js +5 -0
- package/lib/Types/index.js.map +1 -1
- package/lib/Utils/chat-utils.d.ts.map +1 -1
- package/lib/Utils/chat-utils.js +19 -1
- package/lib/Utils/chat-utils.js.map +1 -1
- package/lib/Utils/decode-wa-message.d.ts.map +1 -1
- package/lib/Utils/decode-wa-message.js +4 -1
- package/lib/Utils/decode-wa-message.js.map +1 -1
- package/lib/Utils/event-buffer.js +21 -1
- package/lib/Utils/event-buffer.js.map +1 -1
- package/lib/Utils/generics.js +1 -1
- package/lib/Utils/group-history.d.ts +37 -0
- package/lib/Utils/group-history.d.ts.map +1 -0
- package/lib/Utils/group-history.js +55 -0
- package/lib/Utils/group-history.js.map +1 -0
- package/lib/Utils/index.d.ts +3 -0
- package/lib/Utils/index.d.ts.map +1 -1
- package/lib/Utils/index.js +3 -0
- package/lib/Utils/index.js.map +1 -1
- package/lib/Utils/link-preview.d.ts.map +1 -1
- package/lib/Utils/link-preview.js +21 -7
- package/lib/Utils/link-preview.js.map +1 -1
- package/lib/Utils/message-retry-manager.d.ts +4 -0
- package/lib/Utils/message-retry-manager.d.ts.map +1 -1
- package/lib/Utils/message-retry-manager.js +11 -0
- package/lib/Utils/message-retry-manager.js.map +1 -1
- package/lib/Utils/messages-media.d.ts +25 -9
- package/lib/Utils/messages-media.d.ts.map +1 -1
- package/lib/Utils/messages-media.js +114 -27
- package/lib/Utils/messages-media.js.map +1 -1
- package/lib/Utils/messages.d.ts +89 -2
- package/lib/Utils/messages.d.ts.map +1 -1
- package/lib/Utils/messages.js +414 -15
- package/lib/Utils/messages.js.map +1 -1
- package/lib/Utils/offline-node-processor.d.ts +1 -1
- package/lib/Utils/offline-node-processor.d.ts.map +1 -1
- package/lib/Utils/process-message.d.ts +25 -0
- package/lib/Utils/process-message.d.ts.map +1 -1
- package/lib/Utils/process-message.js +60 -2
- package/lib/Utils/process-message.js.map +1 -1
- package/lib/Utils/reporting-utils.d.ts +7 -0
- package/lib/Utils/reporting-utils.d.ts.map +1 -1
- package/lib/Utils/reporting-utils.js +7 -0
- package/lib/Utils/reporting-utils.js.map +1 -1
- package/lib/Utils/sync-key-auto-resolve.d.ts +10 -0
- package/lib/Utils/sync-key-auto-resolve.d.ts.map +1 -0
- package/lib/Utils/sync-key-auto-resolve.js +33 -0
- package/lib/Utils/sync-key-auto-resolve.js.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -1
- package/lib/Utils/use-multi-file-auth-state.js +34 -2
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -1
- package/lib/Utils/validate-connection.d.ts.map +1 -1
- package/lib/Utils/validate-connection.js +3 -2
- package/lib/Utils/validate-connection.js.map +1 -1
- package/lib/Utils/zip.d.ts +11 -0
- package/lib/Utils/zip.d.ts.map +1 -0
- package/lib/Utils/zip.js +88 -0
- package/lib/Utils/zip.js.map +1 -0
- package/lib/WABinary/generic-utils.d.ts +7 -0
- package/lib/WABinary/generic-utils.d.ts.map +1 -1
- package/lib/WABinary/generic-utils.js +88 -0
- package/lib/WABinary/generic-utils.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
# wolfsocket
|
|
2
|
-
|
|
3
|
-
`wolfsocket` is a [Baileys](https://github.com/WhiskeySockets/Baileys) fork maintained by **WOLF TECH**. It preserves the upstream API while adding native group-status messages, enhanced sticker fields, and native WhatsApp table rendering for Markdown AI responses.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install wolfsocket
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
The package is ESM and requires Node.js 20 or newer.
|
|
12
|
-
|
|
13
|
-
## Quick start
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
import makeWASocket, { useMultiFileAuthState } from 'wolfsocket'
|
|
17
|
-
|
|
18
|
-
const { state, saveCreds } = await useMultiFileAuthState('auth_info')
|
|
19
|
-
const sock = makeWASocket({ auth: state })
|
|
20
|
-
sock.ev.on('creds.update', saveCreds)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Native Markdown tables
|
|
24
|
-
|
|
25
|
-
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.
|
|
26
|
-
|
|
27
|
-
```js
|
|
28
|
-
const aiResponse = `Current plans:
|
|
29
|
-
|
|
30
|
-
| Plan | Storage | Price |
|
|
31
|
-
| --- | ---: | ---: |
|
|
32
|
-
| Basic | 10 GB | $5 |
|
|
33
|
-
| Pro | 100 GB | $15 |
|
|
34
|
-
|
|
35
|
-
Choose the plan that works for you.`
|
|
36
|
-
|
|
37
|
-
await sock.sendMessage(jid, {
|
|
38
|
-
markdownTable: aiResponse,
|
|
39
|
-
tableTitle: 'Plan comparison'
|
|
40
|
-
})
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Supported behavior:
|
|
44
|
-
|
|
45
|
-
- Multiple tables in one response
|
|
46
|
-
- Text before, between, and after tables
|
|
47
|
-
- Native heading and data rows
|
|
48
|
-
- Escaped pipe characters (`\|`)
|
|
49
|
-
- Optional title for the first table
|
|
50
|
-
- Validation that every row has the same number of columns
|
|
51
|
-
|
|
52
|
-
The lower-level helpers are also exported:
|
|
53
|
-
|
|
54
|
-
```js
|
|
55
|
-
import { parseMarkdownTables, markdownToAIRichResponse } from 'wolfsocket'
|
|
56
|
-
|
|
57
|
-
const submessages = parseMarkdownTables(markdown, { title: 'Results' })
|
|
58
|
-
const richResponse = markdownToAIRichResponse(markdown, { title: 'Results' })
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Article cards
|
|
62
|
-
|
|
63
|
-
Send a WhatsApp external-ad reply card with `sock.sendArticleCard()`. The card metadata is encoded in `contextInfo.externalAdReply`.
|
|
64
|
-
|
|
65
|
-
```js
|
|
66
|
-
await sock.sendArticleCard(jid, {
|
|
67
|
-
text: 'Learn more in these articles:',
|
|
68
|
-
title: 'How to create and share a status',
|
|
69
|
-
body: 'WhatsApp Help Center',
|
|
70
|
-
url: 'https://faq.whatsapp.com/123456',
|
|
71
|
-
thumbnailUrl: 'https://example.com/help-center.png',
|
|
72
|
-
mediaType: 1,
|
|
73
|
-
renderLargerThumbnail: true,
|
|
74
|
-
showAdAttribution: true
|
|
75
|
-
})
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
`text`, `body`, and `thumbnailUrl` are optional. `mediaType` accepts the protobuf image (`1`) or video (`2`) value. WhatsApp controls the final card appearance and attribution label.
|
|
79
|
-
|
|
80
|
-
## Group status
|
|
81
|
-
|
|
82
|
-
`sendGroupStatus()` posts an update visible only inside a particular WhatsApp group. The group JID must end in `@g.us`.
|
|
83
|
-
|
|
84
|
-
```js
|
|
85
|
-
await sock.sendGroupStatus(groupJid, { text: 'Hello, group!' })
|
|
86
|
-
|
|
87
|
-
await sock.sendGroupStatus(groupJid, {
|
|
88
|
-
image: imageBuffer,
|
|
89
|
-
caption: 'New image'
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
await sock.sendGroupStatus(groupJid, {
|
|
93
|
-
video: videoBuffer,
|
|
94
|
-
caption: 'New video'
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
await sock.sendGroupStatus(groupJid, {
|
|
98
|
-
audio: audioBuffer,
|
|
99
|
-
mimetype: 'audio/ogg; codecs=opus',
|
|
100
|
-
ptt: true
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
await sock.sendGroupStatus(groupJid, { sticker: stickerBuffer })
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### `sock.sendGroupStatus(jid, content)`
|
|
107
|
-
|
|
108
|
-
| Parameter | Type | Description |
|
|
109
|
-
| --- | --- | --- |
|
|
110
|
-
| `jid` | `string` | Target group JID (`...@g.us`) |
|
|
111
|
-
| `content` | `AnyMessageContent` | Content accepted by `sock.sendMessage()` |
|
|
112
|
-
|
|
113
|
-
Returns a `Promise<WAMessage>` containing the sent message key.
|
|
114
|
-
|
|
115
|
-
## Enhanced sticker fields
|
|
116
|
-
|
|
117
|
-
The regular message API supports additional sticker properties represented by the current WhatsApp protobuf:
|
|
118
|
-
|
|
119
|
-
```js
|
|
120
|
-
await sock.sendMessage(jid, {
|
|
121
|
-
sticker: webpBuffer,
|
|
122
|
-
isAiSticker: true,
|
|
123
|
-
isAvatar: false,
|
|
124
|
-
isLottie: false,
|
|
125
|
-
accessibilityLabel: 'AI-generated sticker'
|
|
126
|
-
})
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
These fields do not convert a WebP file into WhatsApp's signed premium `application/was` sticker format.
|
|
130
|
-
|
|
131
|
-
## Differences from upstream Baileys
|
|
132
|
-
|
|
133
|
-
- Adds `sock.sendGroupStatus()` for text and media group-status updates.
|
|
134
|
-
- Adds Markdown-to-native-table parsing through the `markdownTable` message property.
|
|
135
|
-
- Adds `sock.sendArticleCard()` for external-ad reply article cards.
|
|
136
|
-
- Exports `parseMarkdownTables()` and `markdownToAIRichResponse()`.
|
|
137
|
-
- Supports enhanced sticker protobuf fields.
|
|
138
|
-
- Fixes media stanza detection required by group-status messages.
|
|
139
|
-
|
|
140
|
-
All other standard Baileys APIs remain available.
|
|
141
|
-
|
|
142
|
-
## License
|
|
143
|
-
|
|
144
|
-
MIT. See [LICENSE](./LICENSE). The original Baileys copyright notice is preserved. Modifications by Briton Kiplangat (Silent Wolf) / WOLF TECH are licensed under the same terms.
|
|
1
|
+
# wolfsocket
|
|
2
|
+
|
|
3
|
+
`wolfsocket` is a [Baileys](https://github.com/WhiskeySockets/Baileys) fork maintained by **WOLF TECH**. It preserves the upstream API while adding native group-status messages, enhanced sticker fields, and native WhatsApp table rendering for Markdown AI responses.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install wolfsocket
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The package is ESM and requires Node.js 20 or newer.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import makeWASocket, { useMultiFileAuthState } from 'wolfsocket'
|
|
17
|
+
|
|
18
|
+
const { state, saveCreds } = await useMultiFileAuthState('auth_info')
|
|
19
|
+
const sock = makeWASocket({ auth: state })
|
|
20
|
+
sock.ev.on('creds.update', saveCreds)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Native Markdown tables
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
const aiResponse = `Current plans:
|
|
29
|
+
|
|
30
|
+
| Plan | Storage | Price |
|
|
31
|
+
| --- | ---: | ---: |
|
|
32
|
+
| Basic | 10 GB | $5 |
|
|
33
|
+
| Pro | 100 GB | $15 |
|
|
34
|
+
|
|
35
|
+
Choose the plan that works for you.`
|
|
36
|
+
|
|
37
|
+
await sock.sendMessage(jid, {
|
|
38
|
+
markdownTable: aiResponse,
|
|
39
|
+
tableTitle: 'Plan comparison'
|
|
40
|
+
})
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Supported behavior:
|
|
44
|
+
|
|
45
|
+
- Multiple tables in one response
|
|
46
|
+
- Text before, between, and after tables
|
|
47
|
+
- Native heading and data rows
|
|
48
|
+
- Escaped pipe characters (`\|`)
|
|
49
|
+
- Optional title for the first table
|
|
50
|
+
- Validation that every row has the same number of columns
|
|
51
|
+
|
|
52
|
+
The lower-level helpers are also exported:
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
import { parseMarkdownTables, markdownToAIRichResponse } from 'wolfsocket'
|
|
56
|
+
|
|
57
|
+
const submessages = parseMarkdownTables(markdown, { title: 'Results' })
|
|
58
|
+
const richResponse = markdownToAIRichResponse(markdown, { title: 'Results' })
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Article cards
|
|
62
|
+
|
|
63
|
+
Send a WhatsApp external-ad reply card with `sock.sendArticleCard()`. The card metadata is encoded in `contextInfo.externalAdReply`.
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
await sock.sendArticleCard(jid, {
|
|
67
|
+
text: 'Learn more in these articles:',
|
|
68
|
+
title: 'How to create and share a status',
|
|
69
|
+
body: 'WhatsApp Help Center',
|
|
70
|
+
url: 'https://faq.whatsapp.com/123456',
|
|
71
|
+
thumbnailUrl: 'https://example.com/help-center.png',
|
|
72
|
+
mediaType: 1,
|
|
73
|
+
renderLargerThumbnail: true,
|
|
74
|
+
showAdAttribution: true
|
|
75
|
+
})
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`text`, `body`, and `thumbnailUrl` are optional. `mediaType` accepts the protobuf image (`1`) or video (`2`) value. WhatsApp controls the final card appearance and attribution label.
|
|
79
|
+
|
|
80
|
+
## Group status
|
|
81
|
+
|
|
82
|
+
`sendGroupStatus()` posts an update visible only inside a particular WhatsApp group. The group JID must end in `@g.us`.
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
await sock.sendGroupStatus(groupJid, { text: 'Hello, group!' })
|
|
86
|
+
|
|
87
|
+
await sock.sendGroupStatus(groupJid, {
|
|
88
|
+
image: imageBuffer,
|
|
89
|
+
caption: 'New image'
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
await sock.sendGroupStatus(groupJid, {
|
|
93
|
+
video: videoBuffer,
|
|
94
|
+
caption: 'New video'
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
await sock.sendGroupStatus(groupJid, {
|
|
98
|
+
audio: audioBuffer,
|
|
99
|
+
mimetype: 'audio/ogg; codecs=opus',
|
|
100
|
+
ptt: true
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
await sock.sendGroupStatus(groupJid, { sticker: stickerBuffer })
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### `sock.sendGroupStatus(jid, content)`
|
|
107
|
+
|
|
108
|
+
| Parameter | Type | Description |
|
|
109
|
+
| --- | --- | --- |
|
|
110
|
+
| `jid` | `string` | Target group JID (`...@g.us`) |
|
|
111
|
+
| `content` | `AnyMessageContent` | Content accepted by `sock.sendMessage()` |
|
|
112
|
+
|
|
113
|
+
Returns a `Promise<WAMessage>` containing the sent message key.
|
|
114
|
+
|
|
115
|
+
## Enhanced sticker fields
|
|
116
|
+
|
|
117
|
+
The regular message API supports additional sticker properties represented by the current WhatsApp protobuf:
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
await sock.sendMessage(jid, {
|
|
121
|
+
sticker: webpBuffer,
|
|
122
|
+
isAiSticker: true,
|
|
123
|
+
isAvatar: false,
|
|
124
|
+
isLottie: false,
|
|
125
|
+
accessibilityLabel: 'AI-generated sticker'
|
|
126
|
+
})
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
These fields do not convert a WebP file into WhatsApp's signed premium `application/was` sticker format.
|
|
130
|
+
|
|
131
|
+
## Differences from upstream Baileys
|
|
132
|
+
|
|
133
|
+
- Adds `sock.sendGroupStatus()` for text and media group-status updates.
|
|
134
|
+
- Adds Markdown-to-native-table parsing through the `markdownTable` message property.
|
|
135
|
+
- Adds `sock.sendArticleCard()` for external-ad reply article cards.
|
|
136
|
+
- Exports `parseMarkdownTables()` and `markdownToAIRichResponse()`.
|
|
137
|
+
- Supports enhanced sticker protobuf fields.
|
|
138
|
+
- Fixes media stanza detection required by group-status messages.
|
|
139
|
+
|
|
140
|
+
All other standard Baileys APIs remain available.
|
|
141
|
+
|
|
142
|
+
## License
|
|
143
|
+
|
|
144
|
+
MIT. See [LICENSE](./LICENSE). The original Baileys copyright notice is preserved. Modifications by Briton Kiplangat (Silent Wolf) / WOLF TECH are licensed under the same terms.
|
package/WAProto/WAProto.proto
CHANGED
|
@@ -2158,7 +2158,8 @@ message Message {
|
|
|
2158
2158
|
optional StatusStickerInteractionMessage statusStickerInteractionMessage = 110;
|
|
2159
2159
|
optional PollCreationMessage pollCreationMessageV5 = 111;
|
|
2160
2160
|
optional NewsletterFollowerInviteMessage newsletterFollowerInviteMessageV2 = 113;
|
|
2161
|
-
optional PollResultSnapshotMessage pollResultSnapshotMessageV3 =
|
|
2161
|
+
optional PollResultSnapshotMessage pollResultSnapshotMessageV3 = 115;
|
|
2162
|
+
optional PollAddOptionMessage pollAddOptionMessage = 121;
|
|
2162
2163
|
message AlbumMessage {
|
|
2163
2164
|
optional uint32 expectedImageCount = 2;
|
|
2164
2165
|
optional uint32 expectedVideoCount = 3;
|
|
@@ -3236,6 +3237,9 @@ message Message {
|
|
|
3236
3237
|
optional Message.PollContentType pollContentType = 6;
|
|
3237
3238
|
optional Message.PollType pollType = 7;
|
|
3238
3239
|
optional Option correctAnswer = 8;
|
|
3240
|
+
optional int64 endTime = 9;
|
|
3241
|
+
optional bool hideParticipantName = 10;
|
|
3242
|
+
optional bool allowAddOption = 11;
|
|
3239
3243
|
message Option {
|
|
3240
3244
|
optional string optionName = 1;
|
|
3241
3245
|
optional string optionHash = 2;
|
|
@@ -3271,6 +3275,11 @@ message Message {
|
|
|
3271
3275
|
optional int64 senderTimestampMs = 4;
|
|
3272
3276
|
}
|
|
3273
3277
|
|
|
3278
|
+
message PollAddOptionMessage {
|
|
3279
|
+
optional MessageKey pollCreationMessageKey = 1;
|
|
3280
|
+
optional PollCreationMessage.Option addOption = 2;
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3274
3283
|
message PollUpdateMessageMetadata {
|
|
3275
3284
|
}
|
|
3276
3285
|
|
package/WAProto/index.d.ts
CHANGED
|
@@ -5278,6 +5278,7 @@ export namespace proto {
|
|
|
5278
5278
|
pollCreationMessageV5?: (proto.Message.IPollCreationMessage|null);
|
|
5279
5279
|
newsletterFollowerInviteMessageV2?: (proto.Message.INewsletterFollowerInviteMessage|null);
|
|
5280
5280
|
pollResultSnapshotMessageV3?: (proto.Message.IPollResultSnapshotMessage|null);
|
|
5281
|
+
pollAddOptionMessage?: (proto.Message.IPollAddOptionMessage|null);
|
|
5281
5282
|
}
|
|
5282
5283
|
|
|
5283
5284
|
class Message implements IMessage {
|
|
@@ -5377,6 +5378,7 @@ export namespace proto {
|
|
|
5377
5378
|
public pollCreationMessageV5?: (proto.Message.IPollCreationMessage|null);
|
|
5378
5379
|
public newsletterFollowerInviteMessageV2?: (proto.Message.INewsletterFollowerInviteMessage|null);
|
|
5379
5380
|
public pollResultSnapshotMessageV3?: (proto.Message.IPollResultSnapshotMessage|null);
|
|
5381
|
+
public pollAddOptionMessage?: (proto.Message.IPollAddOptionMessage|null);
|
|
5380
5382
|
public static create(properties?: proto.IMessage): proto.Message;
|
|
5381
5383
|
public static encode(m: proto.IMessage, w?: $protobuf.Writer): $protobuf.Writer;
|
|
5382
5384
|
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message;
|
|
@@ -8306,6 +8308,9 @@ export namespace proto {
|
|
|
8306
8308
|
pollContentType?: (proto.Message.PollContentType|null);
|
|
8307
8309
|
pollType?: (proto.Message.PollType|null);
|
|
8308
8310
|
correctAnswer?: (proto.Message.PollCreationMessage.IOption|null);
|
|
8311
|
+
endTime?: (number|Long|null);
|
|
8312
|
+
hideParticipantName?: (boolean|null);
|
|
8313
|
+
allowAddOption?: (boolean|null);
|
|
8309
8314
|
}
|
|
8310
8315
|
|
|
8311
8316
|
class PollCreationMessage implements IPollCreationMessage {
|
|
@@ -8318,6 +8323,9 @@ export namespace proto {
|
|
|
8318
8323
|
public pollContentType?: (proto.Message.PollContentType|null);
|
|
8319
8324
|
public pollType?: (proto.Message.PollType|null);
|
|
8320
8325
|
public correctAnswer?: (proto.Message.PollCreationMessage.IOption|null);
|
|
8326
|
+
public endTime?: (number|Long|null);
|
|
8327
|
+
public hideParticipantName?: (boolean|null);
|
|
8328
|
+
public allowAddOption?: (boolean|null);
|
|
8321
8329
|
public static create(properties?: proto.Message.IPollCreationMessage): proto.Message.PollCreationMessage;
|
|
8322
8330
|
public static encode(m: proto.Message.IPollCreationMessage, w?: $protobuf.Writer): $protobuf.Writer;
|
|
8323
8331
|
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollCreationMessage;
|
|
@@ -8436,6 +8444,24 @@ export namespace proto {
|
|
|
8436
8444
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
8437
8445
|
}
|
|
8438
8446
|
|
|
8447
|
+
interface IPollAddOptionMessage {
|
|
8448
|
+
pollCreationMessageKey?: (proto.IMessageKey|null);
|
|
8449
|
+
addOption?: (proto.Message.PollCreationMessage.IOption|null);
|
|
8450
|
+
}
|
|
8451
|
+
|
|
8452
|
+
class PollAddOptionMessage implements IPollAddOptionMessage {
|
|
8453
|
+
constructor(p?: proto.Message.IPollAddOptionMessage);
|
|
8454
|
+
public pollCreationMessageKey?: (proto.IMessageKey|null);
|
|
8455
|
+
public addOption?: (proto.Message.PollCreationMessage.IOption|null);
|
|
8456
|
+
public static create(properties?: proto.Message.IPollAddOptionMessage): proto.Message.PollAddOptionMessage;
|
|
8457
|
+
public static encode(m: proto.Message.IPollAddOptionMessage, w?: $protobuf.Writer): $protobuf.Writer;
|
|
8458
|
+
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollAddOptionMessage;
|
|
8459
|
+
public static fromObject(d: { [k: string]: any }): proto.Message.PollAddOptionMessage;
|
|
8460
|
+
public static toObject(m: proto.Message.PollAddOptionMessage, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
8461
|
+
public toJSON(): { [k: string]: any };
|
|
8462
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
8463
|
+
}
|
|
8464
|
+
|
|
8439
8465
|
interface IPollUpdateMessageMetadata {
|
|
8440
8466
|
}
|
|
8441
8467
|
|