Skip to content

Commit 1598f93

Browse files
Release v1.3.2
1 parent f8225ac commit 1598f93

36 files changed

+4735
-13989
lines changed

whatsapp_addon/Baileys/.eslintignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ coverage
44
*.lock
55
.eslintrc.json
66
src/WABinary/index.ts
7-
WAProto
7+
WAProto
8+
WASignalGroup
9+
Example/test.ts
10+
docs
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
{
2-
"extends": "@adiwajshing"
2+
"extends": "@adiwajshing",
3+
"rules": {
4+
"@typescript-eslint/no-explicit-any": [
5+
"warn",
6+
{
7+
"ignoreRestArgs": true
8+
}
9+
],
10+
"no-restricted-syntax": [
11+
"warn",
12+
{
13+
"selector": "TSEnumDeclaration",
14+
"message": "Don't declare enums, use literals instead"
15+
}
16+
]
17+
}
318
}

whatsapp_addon/Baileys/.gitignore

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
node_modules
1+
.DS_Store
2+
.env
3+
.yarn/
4+
*.tgz
5+
*/.DS_Store
26
auth_info*.json
37
baileys_auth_info*
48
baileys_store*.json
5-
output.csv
6-
*/.DS_Store
7-
.DS_Store
8-
.env
99
browser-messages.json
10+
browser-token.json
1011
decoded-ws.json
11-
lib
1212
docs
13-
browser-token.json
14-
Proxy
13+
lib
1514
messages*.json
15+
node_modules
16+
output.csv
17+
Proxy
1618
test.ts
17-
TestData
19+
TestData
20+
wa-logs.txt

whatsapp_addon/Baileys/.npmignore

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
git:
2+
commitMessage: "chore(release): v${version}"
3+
tagAnnotation: "chore(release): v${version}"
4+
tagName: "v${version}"
5+
6+
hooks:
7+
after:bump:
8+
- "npm run changelog:update"
9+
10+
# automatic publish from github workflow
11+
npm:
12+
publish: false
13+
private: true
14+
registry: "OMITTED"
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
## 6.2.1 (2023-06-07)
2-
3-
4-
### Bug Fixes
5-
6-
* updated proto/version to v2.2323.4 ([#96](https://github.com/WhiskeySockets/Baileys/issues/96)) ([63575e9](https://github.com/WhiskeySockets/Baileys/commit/63575e9b85520bd7621bd16ac0508cdd523a3a43))
1+
# 6.3.0 (2023-06-17)
72

83

94

whatsapp_addon/Baileys/README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Baileys - Typescript/Javascript WhatsApp Web API
22

3+
### Important Note
4+
5+
This library was originally a project for **CS-2362 at Ashoka University** and is in no way affiliated with or endorsed by WhatsApp. Use at your own discretion. Do not spam people with this.
6+
We hold no liability for your use of this tool, in fact, depending on how you use this library, you'll be in violation of WhatsApp's Terms of Service. We discourage any stalkerware, bulk or automated messaging usage.
7+
8+
39
Baileys does not require Selenium or any other browser to be interface with WhatsApp Web, it does so directly using a **WebSocket**.
410
Not running Selenium or Chromimum saves you like **half a gig** of ram :/
511
Baileys supports interacting with the multi-device & web versions of WhatsApp.
@@ -758,7 +764,7 @@ await sock.sendMessage(
758764
- To get someone's presence (if they're typing or online)
759765
``` ts
760766
// the presence update is fetched and called here
761-
sock.ev.on('presence-update', json => console.log(json))
767+
sock.ev.on('presence.update', json => console.log(json))
762768
// request updates for a chat
763769
await sock.presenceSubscribe("xyz@s.whatsapp.net")
764770
```
@@ -847,6 +853,21 @@ Of course, replace ``` xyz ``` with an actual ID.
847853
```
848854
Of course, replace ``` xxx ``` with invitation code.
849855

856+
- To get list request join
857+
``` ts
858+
const response = await sock.groupRequestParticipantsList("abcd-xyz@g.us")
859+
console.log(response)
860+
```
861+
- To approve/reject request join
862+
``` ts
863+
const response = await sock.groupRequestParticipantsUpdate(
864+
"abcd-xyz@g.us", // id group,
865+
["abcd@s.whatsapp.net", "efgh@s.whatsapp.net"],
866+
"approve" // replace this parameter with "reject"
867+
)
868+
console.log(response)
869+
```
870+
850871
## Privacy
851872
- To get the privacy settings
852873
``` ts
@@ -933,9 +954,4 @@ Some examples:
933954
// for any message with tag 'edge_routing', id attribute = abcd & first content node routing_info
934955
sock.ws.on(`CB:edge_routing,id:abcd,routing_info`, (node: BinaryNode) => { })
935956
```
936-
937-
### Note
938-
939-
This library was originally a project for **CS-2362 at Ashoka University** and is in no way affiliated with WhatsApp. Use at your own discretion. Do not spam people with this.
940-
941957
Also, this repo is now licenced under GPL 3 since it uses [libsignal-node](https://git.questbook.io/backend/service-coderunner/-/merge_requests/1)

whatsapp_addon/Baileys/WAProto/WAProto.proto

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,28 @@ message BizIdentityInfo {
9999
}
100100
}
101101

102+
message BotAvatarMetadata {
103+
optional uint32 sentiment = 1;
104+
repeated PlaybackMetadata dynamicVideoList = 2;
105+
message PlaybackMetadata {
106+
optional string sdProgressiveUrl = 1;
107+
optional string hdProgressiveUrl = 2;
108+
optional string dashManifest = 3;
109+
optional uint32 sentiment = 4;
110+
optional uint32 durationMs = 5;
111+
optional int64 videoID = 6;
112+
}
113+
114+
}
115+
116+
message BotData {
117+
required MessageKey targetMessageKey = 1;
118+
}
119+
120+
message BotMetadata {
121+
optional BotAvatarMetadata avatarMetadata = 1;
122+
}
123+
102124
message CertChain {
103125
optional NoiseCertificate leaf = 1;
104126
optional NoiseCertificate intermediate = 2;
@@ -264,6 +286,7 @@ message ClientPayload {
264286
optional string localeCountryIso31661Alpha2 = 12;
265287
optional string deviceBoard = 13;
266288
optional string deviceExpId = 14;
289+
optional DeviceType deviceType = 15;
267290
message AppVersion {
268291
optional uint32 primary = 1;
269292
optional uint32 secondary = 2;
@@ -272,6 +295,13 @@ message ClientPayload {
272295
optional uint32 quinary = 5;
273296
}
274297

298+
enum DeviceType {
299+
PHONE = 0;
300+
TABLET = 1;
301+
DESKTOP = 2;
302+
WEARABLE = 3;
303+
VR = 4;
304+
}
275305
enum Platform {
276306
ANDROID = 0;
277307
IOS = 1;
@@ -524,6 +554,7 @@ message DeviceProps {
524554
WEAR_OS = 18;
525555
AR_WRIST = 19;
526556
AR_DEVICE = 20;
557+
UWP = 21;
527558
}
528559
}
529560

@@ -555,6 +586,15 @@ message ExternalBlobReference {
555586
optional bytes fileEncSha256 = 6;
556587
}
557588

589+
message FutureMessageData {
590+
optional BotData botData = 1;
591+
}
592+
593+
message FutureproofMessageSecretMessage {
594+
required MessageSecretMessage messageSecretMessage = 1;
595+
required FutureMessageData futureMessageData = 2;
596+
}
597+
558598
message GlobalSettings {
559599
optional WallpaperSettings lightThemeWallpaper = 1;
560600
optional MediaVisibility mediaVisibility = 2;
@@ -794,6 +834,7 @@ message Message {
794834
optional PollCreationMessage pollCreationMessageV3 = 64;
795835
optional ScheduledCallEditMessage scheduledCallEditMessage = 65;
796836
optional VideoMessage ptvMessage = 66;
837+
optional FutureProofMessage botInvokeMessage = 67;
797838
message AppStateFatalExceptionNotification {
798839
repeated string collectionNames = 1;
799840
optional int64 timestamp = 2;
@@ -846,6 +887,21 @@ message Message {
846887
optional bool viewOnce = 21;
847888
}
848889

890+
message BotFeedbackMessage {
891+
optional MessageKey messageKey = 1;
892+
optional BotFeedbackKind kind = 2;
893+
optional string text = 3;
894+
enum BotFeedbackKind {
895+
BOT_FEEDBACK_POSITIVE = 0;
896+
BOT_FEEDBACK_NEGATIVE_GENERIC = 1;
897+
BOT_FEEDBACK_NEGATIVE_HELPFUL = 2;
898+
BOT_FEEDBACK_NEGATIVE_INTERESTING = 3;
899+
BOT_FEEDBACK_NEGATIVE_ACCURATE = 4;
900+
BOT_FEEDBACK_NEGATIVE_SAFE = 5;
901+
BOT_FEEDBACK_NEGATIVE_OTHER = 6;
902+
}
903+
}
904+
849905
message ButtonsMessage {
850906
optional string contentText = 6;
851907
optional string footerText = 7;
@@ -1165,11 +1221,16 @@ message Message {
11651221
Message.InteractiveMessage.ShopMessage shopStorefrontMessage = 4;
11661222
Message.InteractiveMessage.CollectionMessage collectionMessage = 5;
11671223
Message.InteractiveMessage.NativeFlowMessage nativeFlowMessage = 6;
1224+
Message.InteractiveMessage.CarouselMessage carouselMessage = 7;
11681225
}
11691226
message Body {
11701227
optional string text = 1;
11711228
}
11721229

1230+
message CarouselMessage {
1231+
repeated Message.InteractiveMessage cards = 1;
1232+
}
1233+
11731234
message CollectionMessage {
11741235
optional string bizJid = 1;
11751236
optional string id = 2;
@@ -1547,6 +1608,7 @@ message Message {
15471608
optional int64 timestampMs = 15;
15481609
optional Message.PeerDataOperationRequestMessage peerDataOperationRequestMessage = 16;
15491610
optional Message.PeerDataOperationRequestResponseMessage peerDataOperationRequestResponseMessage = 17;
1611+
optional Message.BotFeedbackMessage botFeedbackMessage = 18;
15501612
enum Type {
15511613
REVOKE = 0;
15521614
EPHEMERAL_SETTING = 3;
@@ -1561,6 +1623,8 @@ message Message {
15611623
MESSAGE_EDIT = 14;
15621624
PEER_DATA_OPERATION_REQUEST_MESSAGE = 16;
15631625
PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17;
1626+
REQUEST_WELCOME_MESSAGE = 18;
1627+
BOT_FEEDBACK_MESSAGE = 19;
15641628
}
15651629
}
15661630

@@ -1730,6 +1794,8 @@ message MessageContextInfo {
17301794
optional bytes messageSecret = 3;
17311795
optional bytes paddingBytes = 4;
17321796
optional uint32 messageAddOnDurationInSecs = 5;
1797+
optional bytes botMessageSecret = 6;
1798+
optional BotMetadata botMetadata = 7;
17331799
}
17341800

17351801
message MessageKey {
@@ -1739,6 +1805,12 @@ message MessageKey {
17391805
optional string participant = 4;
17401806
}
17411807

1808+
message MessageSecretMessage {
1809+
optional sfixed32 version = 1;
1810+
optional bytes encIv = 2;
1811+
optional bytes encPayload = 3;
1812+
}
1813+
17421814
message Money {
17431815
optional int64 value = 1;
17441816
optional uint32 offset = 2;
@@ -2562,6 +2634,7 @@ message WebMessageInfo {
25622634
optional string originalSelfAuthorUserJidString = 51;
25632635
optional uint64 revokeMessageTimestamp = 52;
25642636
optional PinInChat pinInChat = 54;
2637+
optional FutureproofMessageSecretMessage futureproofMessageSecretMessage = 55;
25652638
enum BizPrivacyStatus {
25662639
E2EE = 0;
25672640
FB = 2;
@@ -2760,6 +2833,7 @@ message WebMessageInfo {
27602833
PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE = 180;
27612834
LINKED_GROUP_CALL_START = 181;
27622835
REPORT_TO_ADMIN_ENABLED_STATUS = 182;
2836+
EMPTY_SUBGROUP_CREATE = 183;
27632837
}
27642838
}
27652839

0 commit comments

Comments
 (0)