@vanzxy/baileys 1.0.15 → 1.1.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.

Potentially problematic release.


This version of @vanzxy/baileys might be problematic. Click here for more details.

@@ -95,9 +95,9 @@ export const prepareWAMessageMedia = async (message, options) => {
95
95
  ...message,
96
96
  media: message[mediaType]
97
97
  };
98
- if (uploadData.image || uploadData.video) {
99
- uploadData.annotations = mediaAnnotation;
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
- // Lia@Changes 31-01-26 --- Add "groupStatus" boolean to set contextInfo.isGroupStatus and wrap message into groupStatusMessageV2
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,6 +1345,8 @@ export const generateWAMessageContent = async (message, options) => {
1366
1345
  isGroupStatus: message.groupStatus
1367
1346
  };
1368
1347
  }
1348
+ // Vanzxy@Fix: audio must use groupStatusMessage (v1), not V2
1349
+ // V2 is not supported by older WA clients causing black screen for audio
1369
1350
  m = { groupStatusMessageV2: { message: m } };
1370
1351
  delete message.groupStatus;
1371
1352
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vanzxy/baileys",
3
- "version": "1.0.15",
4
- "description": "Enhanced Baileys for Evernight AI by Vanzxy",
3
+ "version": "1.1.1",
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
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git+https://github.com/itsliaaa/baileys.git"
16
+ "url": "git+https://github.com/vanzxy/baileys.git"
17
17
  },
18
18
  "files": [
19
19
  "lib/**/*",
@@ -32,7 +32,7 @@
32
32
  "whatsapp-bot",
33
33
  "whatsapp-web"
34
34
  ],
35
- "homepage": "https://github.com/itsliaaa/baileys#readme",
35
+ "homepage": "https://github.com/vanzxy/baileys#readme",
36
36
  "author": "Vanzxy",
37
37
  "license": "MIT",
38
38
  "dependencies": {
@@ -105,4 +105,4 @@
105
105
  "yaml@npm:^2.6.1": "^2.8.4"
106
106
  },
107
107
  "packageManager": "yarn@4.9.2"
108
- }
108
+ }