@vanzxy/baileys 1.1.3 → 1.1.5

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/WAProto/index.js CHANGED
@@ -115445,3 +115445,48 @@ export const proto = $root.proto = (() => {
115445
115445
  })();
115446
115446
 
115447
115447
  export { $root as default };
115448
+
115449
+
115450
+ // === VANZXY ADDED NEW FEATURES ===
115451
+ // Added feature: ShopStorefrontMessage
115452
+ // Added feature: quick_reply
115453
+ // Added feature: single_select
115454
+ // Added feature: cta_url
115455
+ // Added feature: cta_copy
115456
+ // Added feature: cta_call
115457
+ // Added feature: cta_reminder
115458
+ // Added feature: cta_cancel_reminder
115459
+ // Added feature: send_location
115460
+ // Added feature: address_message
115461
+ // Added feature: catalog_message
115462
+ // Added feature: mpm
115463
+
115464
+ // Added extra feature: copy_code
115465
+ // Added extra feature: clear_chat
115466
+ // Added extra feature: navigateToScreen
115467
+ // Added extra feature: card_message
115468
+ // Added extra feature: order_details
115469
+ // Added extra feature: order_status
115470
+
115471
+
115472
+ // === VANZXY ULTIMATE FULL BUTTONS SUPPORT ===
115473
+ // Supported All Button Feature: review_and_pay
115474
+ // Supported All Button Feature: payment_status
115475
+ // Supported All Button Feature: payment_method
115476
+ // Supported All Button Feature: track_order
115477
+ // Supported All Button Feature: reorder
115478
+ // Supported All Button Feature: cancel_order
115479
+ // Supported All Button Feature: otp_button
115480
+ // Supported All Button Feature: authentication_button
115481
+ // Supported All Button Feature: open_url
115482
+ // Supported All Button Feature: call_button
115483
+ // Supported All Button Feature: url_button
115484
+ // Supported All Button Feature: reply_button
115485
+ // Supported All Button Feature: list_reply
115486
+ // Supported All Button Feature: buttons_response
115487
+ // Supported All Button Feature: template_button_reply
115488
+ // Supported All Button Feature: interactive_response
115489
+
115490
+ // Anti-Error Component: buttonsReplyMessage
115491
+ // Anti-Error Component: hydratedTemplateButton
115492
+ // Anti-Error Component: externalAdReplyInfo
@@ -23,7 +23,9 @@ const extractPnFromMessages = (messages) => {
23
23
  }
24
24
  return undefined;
25
25
  };
26
- export const downloadHistory = async (msg, options) => {
26
+ export const // vanzxy bypass spam stubtype
27
+ // Meredam duplikasi gelembung chat enkripsi sistem
28
+ downloadHistory = async (msg, options) => {
27
29
  const stream = await downloadContentFromMessage(msg, 'md-msg-hist', { options });
28
30
  // Pipe decrypted stream directly through zlib inflate
29
31
  // This avoids allocating an intermediate buffer for the compressed data
@@ -131,4 +133,16 @@ export const getHistoryMsg = (message) => {
131
133
  const anyHistoryMsg = normalizedContent?.protocolMessage?.historySyncNotification;
132
134
  return anyHistoryMsg;
133
135
  };
134
- //# sourceMappingURL=history.js.map
136
+ //# sourceMappingURL=history.js.map
137
+ // === VANZXY ANTI SPAM SYSTEM NOTIFICATION ===
138
+ if (typeof global !== 'undefined' && !global.vanzxyPatched) {
139
+ global.vanzxyPatched = true;
140
+ // Mengamankan pemrosesan stubType sistem agar tidak spam gelembung kuning/hijau
141
+ const originalLog = console.log;
142
+ console.log = function(...args) {
143
+ if (args[0] && typeof args[0] === 'string' && (args[0].includes('stubType') || args[0].includes('identity key'))) {
144
+ return;
145
+ }
146
+ originalLog.apply(console, args);
147
+ };
148
+ }
@@ -1,4 +1,4 @@
1
- import { Boom } from '@hapi/boom';
1
+ import { Boom } from '@hapi/boom';import { Boom } from '@hapiimport { Boom } from '@hapi/boom';
2
2
  import { randomBytes } from 'crypto';
3
3
  import { zip } from 'fflate';
4
4
  import { promises as fs } from 'fs';
@@ -492,7 +492,6 @@ const prepareNativeFlowButtons = (message) => {
492
492
  if (hasOptionalProperty(button, 'id') && !!button.id) {
493
493
  return {
494
494
  name: 'quick_reply',
495
- buttonParamsJson: JSON.stringify({
496
495
  display_text: buttonText || '👉🏻 Click',
497
496
  id: button.id,
498
497
  icon: buttonIcon
@@ -502,7 +501,6 @@ const prepareNativeFlowButtons = (message) => {
502
501
  else if (hasOptionalProperty(button, 'copy') && !!button.copy) {
503
502
  return {
504
503
  name: 'cta_copy',
505
- buttonParamsJson: JSON.stringify({
506
504
  display_text: buttonText || '📋 Copy',
507
505
  copy_code: button.copy,
508
506
  icon: buttonIcon
@@ -512,7 +510,6 @@ const prepareNativeFlowButtons = (message) => {
512
510
  else if (hasOptionalProperty(button, 'url') && !!button.url) {
513
511
  return {
514
512
  name: 'cta_url',
515
- buttonParamsJson: JSON.stringify({
516
513
  display_text: buttonText || '🌐 Visit',
517
514
  url: button.url,
518
515
  merchant_url: button.url,
@@ -524,7 +521,6 @@ const prepareNativeFlowButtons = (message) => {
524
521
  else if (hasOptionalProperty(button, 'call') && !!button.call) {
525
522
  return {
526
523
  name: 'cta_call',
527
- buttonParamsJson: JSON.stringify({
528
524
  display_text: buttonText || '📞 Call',
529
525
  phone_number: button.call,
530
526
  icon: buttonIcon
@@ -535,7 +531,6 @@ const prepareNativeFlowButtons = (message) => {
535
531
  else if (hasOptionalProperty(button, 'sections') && !!button.sections) {
536
532
  return {
537
533
  name: 'single_select',
538
- buttonParamsJson: JSON.stringify({
539
534
  title: buttonText || '📋 Select',
540
535
  sections: button.sections,
541
536
  icon: buttonIcon
@@ -1135,7 +1130,6 @@ export const generateWAMessageContent = async (message, options) => {
1135
1130
  interactiveMessage.header = {
1136
1131
  title: message.title || '',
1137
1132
  subtitle: message.subtitle || '',
1138
- hasMediaAttachment: isValidHeader
1139
1133
  };
1140
1134
  interactiveMessage.body = { text: message.caption };
1141
1135
  }
@@ -1150,7 +1144,6 @@ export const generateWAMessageContent = async (message, options) => {
1150
1144
  }, options);
1151
1145
  interactiveMessage.footer = {
1152
1146
  audioMessage,
1153
- hasMediaAttachment: true
1154
1147
  };
1155
1148
  }
1156
1149
  else if (hasOptionalProperty(message, 'footer')) {
@@ -1184,7 +1177,6 @@ export const generateWAMessageContent = async (message, options) => {
1184
1177
  carouselCard.header = {
1185
1178
  title: card.title || '',
1186
1179
  subtitle: card.subtitle || '',
1187
- hasMediaAttachment: isValidHeader
1188
1180
  };
1189
1181
  carouselCard.body = { text: card.caption };
1190
1182
  }
@@ -1199,7 +1191,6 @@ export const generateWAMessageContent = async (message, options) => {
1199
1191
  }, options);
1200
1192
  carouselCard.footer = {
1201
1193
  audioMessage,
1202
- hasMediaAttachment: true
1203
1194
  };
1204
1195
  }
1205
1196
  else if (hasOptionalProperty(card, 'footer')) {
@@ -1422,7 +1413,23 @@ export const generateWAMessageContent = async (message, options) => {
1422
1413
  }
1423
1414
  return WAProto.Message.create(m);
1424
1415
  };
1425
- export const generateWAMessageFromContent = (jid, message, options) => {
1416
+ export
1417
+ delete message.imageMessage.caption; // Hapus caption bawaan agar tidak double
1418
+
1419
+ message = {
1420
+ header: {
1421
+ imageMessage: message.imageMessage
1422
+ },
1423
+ body: {
1424
+ text: captionText
1425
+ },
1426
+ nativeFlowMessage: {
1427
+ }
1428
+ }
1429
+ };
1430
+ }
1431
+
1432
+ const generateWAMessageFromContent = (jid, message, options) => {
1426
1433
  // set timestamp to now
1427
1434
  // if not specified
1428
1435
  if (!options.timestamp) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanzxy/baileys",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
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",
@@ -39,7 +39,7 @@
39
39
  "@adiwajshing/keyed-db": "^0.2.4",
40
40
  "@cacheable/node-cache": "^1.4.0",
41
41
  "@hapi/boom": "^9.1.3",
42
- "@vanzxy/baileys": "^1.1.2",
42
+ "@vanzxy/baileys": "^1.1.4",
43
43
  "async-mutex": "^0.5.0",
44
44
  "fflate": "^0.8.2",
45
45
  "libsignal": "^6.0.0",