Skip to content

Commit

Permalink
Release v1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppecastaldo committed Jul 7, 2023
1 parent f8225ac commit 1598f93
Show file tree
Hide file tree
Showing 36 changed files with 4,735 additions and 13,989 deletions.
5 changes: 4 additions & 1 deletion whatsapp_addon/Baileys/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ coverage
*.lock
.eslintrc.json
src/WABinary/index.ts
WAProto
WAProto
WASignalGroup
Example/test.ts
docs
17 changes: 16 additions & 1 deletion whatsapp_addon/Baileys/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
{
"extends": "@adiwajshing"
"extends": "@adiwajshing",
"rules": {
"@typescript-eslint/no-explicit-any": [
"warn",
{
"ignoreRestArgs": true
}
],
"no-restricted-syntax": [
"warn",
{
"selector": "TSEnumDeclaration",
"message": "Don't declare enums, use literals instead"
}
]
}
}
21 changes: 12 additions & 9 deletions whatsapp_addon/Baileys/.gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
node_modules
.DS_Store
.env
.yarn/
*.tgz
*/.DS_Store
auth_info*.json
baileys_auth_info*
baileys_store*.json
output.csv
*/.DS_Store
.DS_Store
.env
browser-messages.json
browser-token.json
decoded-ws.json
lib
docs
browser-token.json
Proxy
lib
messages*.json
node_modules
output.csv
Proxy
test.ts
TestData
TestData
wa-logs.txt
Empty file.
1 change: 1 addition & 0 deletions whatsapp_addon/Baileys/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
14 changes: 14 additions & 0 deletions whatsapp_addon/Baileys/.release-it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
git:
commitMessage: "chore(release): v${version}"
tagAnnotation: "chore(release): v${version}"
tagName: "v${version}"

hooks:
after:bump:
- "npm run changelog:update"

# automatic publish from github workflow
npm:
publish: false
private: true
registry: "OMITTED"
7 changes: 1 addition & 6 deletions whatsapp_addon/Baileys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
## 6.2.1 (2023-06-07)


### Bug Fixes

* updated proto/version to v2.2323.4 ([#96](https://github.com/WhiskeySockets/Baileys/issues/96)) ([63575e9](https://github.com/WhiskeySockets/Baileys/commit/63575e9b85520bd7621bd16ac0508cdd523a3a43))
# 6.3.0 (2023-06-17)



28 changes: 22 additions & 6 deletions whatsapp_addon/Baileys/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Baileys - Typescript/Javascript WhatsApp Web API

### Important Note

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.
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.


Baileys does not require Selenium or any other browser to be interface with WhatsApp Web, it does so directly using a **WebSocket**.
Not running Selenium or Chromimum saves you like **half a gig** of ram :/
Baileys supports interacting with the multi-device & web versions of WhatsApp.
Expand Down Expand Up @@ -758,7 +764,7 @@ await sock.sendMessage(
- To get someone's presence (if they're typing or online)
``` ts
// the presence update is fetched and called here
sock.ev.on('presence-update', json => console.log(json))
sock.ev.on('presence.update', json => console.log(json))
// request updates for a chat
await sock.presenceSubscribe("xyz@s.whatsapp.net")
```
Expand Down Expand Up @@ -847,6 +853,21 @@ Of course, replace ``` xyz ``` with an actual ID.
```
Of course, replace ``` xxx ``` with invitation code.

- To get list request join
``` ts
const response = await sock.groupRequestParticipantsList("abcd-xyz@g.us")
console.log(response)
```
- To approve/reject request join
``` ts
const response = await sock.groupRequestParticipantsUpdate(
"abcd-xyz@g.us", // id group,
["abcd@s.whatsapp.net", "efgh@s.whatsapp.net"],
"approve" // replace this parameter with "reject"
)
console.log(response)
```

## Privacy
- To get the privacy settings
``` ts
Expand Down Expand Up @@ -933,9 +954,4 @@ Some examples:
// for any message with tag 'edge_routing', id attribute = abcd & first content node routing_info
sock.ws.on(`CB:edge_routing,id:abcd,routing_info`, (node: BinaryNode) => { })
```

### Note

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.

Also, this repo is now licenced under GPL 3 since it uses [libsignal-node](https://git.questbook.io/backend/service-coderunner/-/merge_requests/1)
74 changes: 74 additions & 0 deletions whatsapp_addon/Baileys/WAProto/WAProto.proto
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,28 @@ message BizIdentityInfo {
}
}

message BotAvatarMetadata {
optional uint32 sentiment = 1;
repeated PlaybackMetadata dynamicVideoList = 2;
message PlaybackMetadata {
optional string sdProgressiveUrl = 1;
optional string hdProgressiveUrl = 2;
optional string dashManifest = 3;
optional uint32 sentiment = 4;
optional uint32 durationMs = 5;
optional int64 videoID = 6;
}

}

message BotData {
required MessageKey targetMessageKey = 1;
}

message BotMetadata {
optional BotAvatarMetadata avatarMetadata = 1;
}

message CertChain {
optional NoiseCertificate leaf = 1;
optional NoiseCertificate intermediate = 2;
Expand Down Expand Up @@ -264,6 +286,7 @@ message ClientPayload {
optional string localeCountryIso31661Alpha2 = 12;
optional string deviceBoard = 13;
optional string deviceExpId = 14;
optional DeviceType deviceType = 15;
message AppVersion {
optional uint32 primary = 1;
optional uint32 secondary = 2;
Expand All @@ -272,6 +295,13 @@ message ClientPayload {
optional uint32 quinary = 5;
}

enum DeviceType {
PHONE = 0;
TABLET = 1;
DESKTOP = 2;
WEARABLE = 3;
VR = 4;
}
enum Platform {
ANDROID = 0;
IOS = 1;
Expand Down Expand Up @@ -524,6 +554,7 @@ message DeviceProps {
WEAR_OS = 18;
AR_WRIST = 19;
AR_DEVICE = 20;
UWP = 21;
}
}

Expand Down Expand Up @@ -555,6 +586,15 @@ message ExternalBlobReference {
optional bytes fileEncSha256 = 6;
}

message FutureMessageData {
optional BotData botData = 1;
}

message FutureproofMessageSecretMessage {
required MessageSecretMessage messageSecretMessage = 1;
required FutureMessageData futureMessageData = 2;
}

message GlobalSettings {
optional WallpaperSettings lightThemeWallpaper = 1;
optional MediaVisibility mediaVisibility = 2;
Expand Down Expand Up @@ -794,6 +834,7 @@ message Message {
optional PollCreationMessage pollCreationMessageV3 = 64;
optional ScheduledCallEditMessage scheduledCallEditMessage = 65;
optional VideoMessage ptvMessage = 66;
optional FutureProofMessage botInvokeMessage = 67;
message AppStateFatalExceptionNotification {
repeated string collectionNames = 1;
optional int64 timestamp = 2;
Expand Down Expand Up @@ -846,6 +887,21 @@ message Message {
optional bool viewOnce = 21;
}

message BotFeedbackMessage {
optional MessageKey messageKey = 1;
optional BotFeedbackKind kind = 2;
optional string text = 3;
enum BotFeedbackKind {
BOT_FEEDBACK_POSITIVE = 0;
BOT_FEEDBACK_NEGATIVE_GENERIC = 1;
BOT_FEEDBACK_NEGATIVE_HELPFUL = 2;
BOT_FEEDBACK_NEGATIVE_INTERESTING = 3;
BOT_FEEDBACK_NEGATIVE_ACCURATE = 4;
BOT_FEEDBACK_NEGATIVE_SAFE = 5;
BOT_FEEDBACK_NEGATIVE_OTHER = 6;
}
}

message ButtonsMessage {
optional string contentText = 6;
optional string footerText = 7;
Expand Down Expand Up @@ -1165,11 +1221,16 @@ message Message {
Message.InteractiveMessage.ShopMessage shopStorefrontMessage = 4;
Message.InteractiveMessage.CollectionMessage collectionMessage = 5;
Message.InteractiveMessage.NativeFlowMessage nativeFlowMessage = 6;
Message.InteractiveMessage.CarouselMessage carouselMessage = 7;
}
message Body {
optional string text = 1;
}

message CarouselMessage {
repeated Message.InteractiveMessage cards = 1;
}

message CollectionMessage {
optional string bizJid = 1;
optional string id = 2;
Expand Down Expand Up @@ -1547,6 +1608,7 @@ message Message {
optional int64 timestampMs = 15;
optional Message.PeerDataOperationRequestMessage peerDataOperationRequestMessage = 16;
optional Message.PeerDataOperationRequestResponseMessage peerDataOperationRequestResponseMessage = 17;
optional Message.BotFeedbackMessage botFeedbackMessage = 18;
enum Type {
REVOKE = 0;
EPHEMERAL_SETTING = 3;
Expand All @@ -1561,6 +1623,8 @@ message Message {
MESSAGE_EDIT = 14;
PEER_DATA_OPERATION_REQUEST_MESSAGE = 16;
PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17;
REQUEST_WELCOME_MESSAGE = 18;
BOT_FEEDBACK_MESSAGE = 19;
}
}

Expand Down Expand Up @@ -1730,6 +1794,8 @@ message MessageContextInfo {
optional bytes messageSecret = 3;
optional bytes paddingBytes = 4;
optional uint32 messageAddOnDurationInSecs = 5;
optional bytes botMessageSecret = 6;
optional BotMetadata botMetadata = 7;
}

message MessageKey {
Expand All @@ -1739,6 +1805,12 @@ message MessageKey {
optional string participant = 4;
}

message MessageSecretMessage {
optional sfixed32 version = 1;
optional bytes encIv = 2;
optional bytes encPayload = 3;
}

message Money {
optional int64 value = 1;
optional uint32 offset = 2;
Expand Down Expand Up @@ -2562,6 +2634,7 @@ message WebMessageInfo {
optional string originalSelfAuthorUserJidString = 51;
optional uint64 revokeMessageTimestamp = 52;
optional PinInChat pinInChat = 54;
optional FutureproofMessageSecretMessage futureproofMessageSecretMessage = 55;
enum BizPrivacyStatus {
E2EE = 0;
FB = 2;
Expand Down Expand Up @@ -2760,6 +2833,7 @@ message WebMessageInfo {
PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE = 180;
LINKED_GROUP_CALL_START = 181;
REPORT_TO_ADMIN_ENABLED_STATUS = 182;
EMPTY_SUBGROUP_CREATE = 183;
}
}

Expand Down
Loading

0 comments on commit 1598f93

Please sign in to comment.