@vanzxy/baileys 1.0.14 → 1.1.0
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.
Potentially problematic release.
This version of @vanzxy/baileys might be problematic. Click here for more details.
- package/README.md +40 -2054
- package/lib/Utils/messages.js +13 -28
- package/package.json +106 -106
package/lib/Utils/messages.js
CHANGED
|
@@ -95,9 +95,9 @@ export const prepareWAMessageMedia = async (message, options) => {
|
|
|
95
95
|
...message,
|
|
96
96
|
media: message[mediaType]
|
|
97
97
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
// Vanzxy@Fix: Removed mediaAnnotation injection that caused "Lihat saluran" (newsletter) button
|
|
99
|
+
// to appear on every image/video sent. Original itslia code injected newsletter contextInfo
|
|
100
|
+
// into all media uploads which is unnecessary and annoying for regular bot usage.
|
|
101
101
|
delete uploadData[mediaType];
|
|
102
102
|
// check if cacheable + generate cache key
|
|
103
103
|
const cacheableKey = typeof uploadData.media === 'object' &&
|
|
@@ -984,29 +984,6 @@ export const generateWAMessageContent = async (message, options) => {
|
|
|
984
984
|
}
|
|
985
985
|
else {
|
|
986
986
|
m = await prepareWAMessageMedia(message, options);
|
|
987
|
-
|
|
988
|
-
// ==========================================
|
|
989
|
-
// VANZXY FIX: ULTIMATE ANTI-SALURAN & AUDIO SW
|
|
990
|
-
// ==========================================
|
|
991
|
-
const jid = options?.jid || '';
|
|
992
|
-
if (jid === 'status@broadcast' && m) {
|
|
993
|
-
// Amankan properti image & video dari tombol saluran (bawaan & anotasinya)
|
|
994
|
-
const msgObj = m;
|
|
995
|
-
if (msgObj.image) {
|
|
996
|
-
msgObj.image.annotations = undefined;
|
|
997
|
-
if (msgObj.image.interactiveAnnotations) msgObj.image.interactiveAnnotations = undefined;
|
|
998
|
-
}
|
|
999
|
-
if (msgObj.video) {
|
|
1000
|
-
msgObj.video.annotations = undefined;
|
|
1001
|
-
if (msgObj.video.interactiveAnnotations) msgObj.video.interactiveAnnotations = undefined;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
// Amankan audio status agar tidak crash di device Android
|
|
1005
|
-
if (msgObj.audio) {
|
|
1006
|
-
msgObj.audio.ptt = true;
|
|
1007
|
-
msgObj.audio.contextInfo = { isGroupStatus: true };
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
987
|
}
|
|
1011
988
|
// Lia@Changes 30-01-26 --- Add interactive messages (buttonsMessage, listMessage, interactiveMessage, templateMessage, and carouselMessage)
|
|
1012
989
|
if (hasNonNullishProperty(message, 'buttons')) {
|
|
@@ -1354,7 +1331,9 @@ export const generateWAMessageContent = async (message, options) => {
|
|
|
1354
1331
|
key.contextInfo = message.contextInfo;
|
|
1355
1332
|
}
|
|
1356
1333
|
}
|
|
1357
|
-
//
|
|
1334
|
+
// Vanzxy@Fix: groupStatus wrapping — audio uses groupStatusMessage (v1) for compatibility
|
|
1335
|
+
// with older WA versions. groupStatusMessageV2 causes black screen ("versi tidak mendukung")
|
|
1336
|
+
// on recipients with older WhatsApp. Only non-audio media uses V2.
|
|
1358
1337
|
if (hasOptionalProperty(message, 'groupStatus') && !!message.groupStatus) {
|
|
1359
1338
|
const messageType = Object.keys(m)[0];
|
|
1360
1339
|
const key = m[messageType];
|
|
@@ -1366,7 +1345,13 @@ export const generateWAMessageContent = async (message, options) => {
|
|
|
1366
1345
|
isGroupStatus: message.groupStatus
|
|
1367
1346
|
};
|
|
1368
1347
|
}
|
|
1369
|
-
|
|
1348
|
+
// Vanzxy@Fix: audio must use groupStatusMessage (v1), not V2
|
|
1349
|
+
// V2 is not supported by older WA clients causing black screen for audio
|
|
1350
|
+
if (messageType === 'audioMessage') {
|
|
1351
|
+
m = { groupStatusMessage: { message: m } };
|
|
1352
|
+
} else {
|
|
1353
|
+
m = { groupStatusMessageV2: { message: m } };
|
|
1354
|
+
}
|
|
1370
1355
|
delete message.groupStatus;
|
|
1371
1356
|
}
|
|
1372
1357
|
// Lia@Changes 06-05-26 --- Add "spoiler" boolean to set contextInfo.isSpoiler and wrap message into spoilerMessage
|
package/package.json
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
2
|
+
"name": "@vanzxy/baileys",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Enhanced Baileys fork by Vanzxy — based on @itsliaaa/baileys + @whiskeysockets/baileys with fixes for audio group status and clean media without newsletter button.",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"preinstall": "node ./engine-requirements.js"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=20.0.0"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/vanzxy/baileys.git"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"lib/**/*",
|
|
20
|
+
"WAProto/**/*",
|
|
21
|
+
"engine-requirements.js"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"automation",
|
|
25
|
+
"baileys",
|
|
26
|
+
"bot",
|
|
27
|
+
"interactive-messages",
|
|
28
|
+
"js-whatsapp",
|
|
29
|
+
"multi-device",
|
|
30
|
+
"whatsapp",
|
|
31
|
+
"whatsapp-api",
|
|
32
|
+
"whatsapp-bot",
|
|
33
|
+
"whatsapp-web"
|
|
34
|
+
],
|
|
35
|
+
"homepage": "https://github.com/vanzxy/baileys#readme",
|
|
36
|
+
"author": "Vanzxy",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@adiwajshing/keyed-db": "^0.2.4",
|
|
40
|
+
"@cacheable/node-cache": "^1.4.0",
|
|
41
|
+
"@hapi/boom": "^9.1.3",
|
|
42
|
+
"async-mutex": "^0.5.0",
|
|
43
|
+
"fflate": "^0.8.2",
|
|
44
|
+
"libsignal": "^6.0.0",
|
|
45
|
+
"lru-cache": "^11.2.6",
|
|
46
|
+
"music-metadata": "^11.12.3",
|
|
47
|
+
"p-queue": "^9.1.0",
|
|
48
|
+
"pino": "^9.6.0",
|
|
49
|
+
"protobufjs": "^7.5.6",
|
|
50
|
+
"whatsapp-rust-bridge": "0.5.5",
|
|
51
|
+
"ws": "^8.19.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@napi-rs/image": "~1.12.0",
|
|
55
|
+
"audio-decode": "^2.2.3",
|
|
56
|
+
"better-sqlite3": "^11.0.0",
|
|
57
|
+
"jimp": "^1.6.1",
|
|
58
|
+
"link-preview-js": "^3.0.0",
|
|
59
|
+
"sharp": "*"
|
|
60
|
+
},
|
|
61
|
+
"peerDependenciesMeta": {
|
|
62
|
+
"@napi-rs/image": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"audio-decode": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"better-sqlite3": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"jimp": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"link-preview-js": {
|
|
75
|
+
"optional": true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"resolutions": {
|
|
79
|
+
"ajv@npm:^6.12.4": "^6.14.0",
|
|
80
|
+
"basic-ftp": "^5.2.4",
|
|
81
|
+
"brace-expansion@npm:^1.1.7": "^1.1.13",
|
|
82
|
+
"brace-expansion@npm:^2.0.1": "^2.0.3",
|
|
83
|
+
"flatted": "^3.4.2",
|
|
84
|
+
"glob@npm:^10.2.2": "^10.5.0",
|
|
85
|
+
"glob@npm:^10.3.10": "^10.5.0",
|
|
86
|
+
"glob@npm:^10.5.0": "^10.5.0",
|
|
87
|
+
"handlebars": "^4.7.9",
|
|
88
|
+
"ip-address": "^10.1.1",
|
|
89
|
+
"js-yaml@npm:^3.13.1": "^3.14.2",
|
|
90
|
+
"js-yaml@npm:^4.1.0": "^4.1.1",
|
|
91
|
+
"markdown-it": "^14.1.1",
|
|
92
|
+
"minimatch@npm:^3.0.4": "^3.1.5",
|
|
93
|
+
"minimatch@npm:^3.1.2": "^3.1.5",
|
|
94
|
+
"minimatch@npm:^5.0.1": "^5.1.8",
|
|
95
|
+
"minimatch@npm:^9.0.4": "^9.0.9",
|
|
96
|
+
"minimatch@npm:^9.0.5": "^9.0.9",
|
|
97
|
+
"picomatch@npm:^2.0.4": "^2.3.2",
|
|
98
|
+
"picomatch@npm:^2.3.1": "^2.3.2",
|
|
99
|
+
"picomatch@npm:^4.0.0": "^4.0.4",
|
|
100
|
+
"picomatch@npm:^4.0.2": "^4.0.4",
|
|
101
|
+
"socks": "^2.8.8",
|
|
102
|
+
"tar": "^7.5.11",
|
|
103
|
+
"tmp": "^0.2.5",
|
|
104
|
+
"underscore": "^1.13.8",
|
|
105
|
+
"yaml@npm:^2.6.1": "^2.8.4"
|
|
106
|
+
},
|
|
107
|
+
"packageManager": "yarn@4.9.2"
|
|
108
108
|
}
|