@vinzsocket/baileys 3.2.5 → 3.2.6

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.
@@ -1115,6 +1115,14 @@ export const makeMessagesSocket = (config) => {
1115
1115
  additionalNodes: buildInteractiveAdditionalNodes(jid, nestedMsg.message)
1116
1116
  });
1117
1117
  }
1118
+ case 'MULTI_SELECT': {
1119
+ const msContent = await extendedMessages.handleMultiSelect(content, jid, quoted, options);
1120
+ const msMsg = await generateWAMessageFromContent(jid, msContent, { quoted });
1121
+ return await relayMessage(jid, msMsg.message, {
1122
+ messageId: msMsg.key.id,
1123
+ additionalNodes: buildInteractiveAdditionalNodes(jid, msMsg.message)
1124
+ });
1125
+ }
1118
1126
  }
1119
1127
  }
1120
1128
  const fullMsg = await generateWAMessage(jid, content, {
@@ -387,18 +387,14 @@ export const buildInteractiveAdditionalNodes = (jid, m) => {
387
387
  const nodes = [];
388
388
  const group = isJidGroup(jid);
389
389
  if (inner.listMessage) {
390
+ // Legacy listMessage (sendList, sendNestedList)
390
391
  nodes.push({
391
392
  tag: 'biz',
392
393
  attrs: {},
393
- content: [
394
- {
395
- tag: 'list',
396
- attrs: { type: 'product_list', v: '2' }
397
- }
398
- ]
394
+ content: [{ tag: 'list', attrs: { type: 'product_list', v: '2' } }]
399
395
  });
400
- }
401
- else if (inner.interactiveMessage || inner.buttonsMessage || inner.templateMessage || inner.productMessage) {
396
+ } else if (inner.interactiveMessage || inner.buttonsMessage || inner.templateMessage || inner.productMessage) {
397
+ // Native flow (sendMultiButton, sendListButton, sendCard, multiSelectMessage, dll)
402
398
  nodes.push({
403
399
  tag: 'biz',
404
400
  attrs: {},
@@ -406,21 +402,19 @@ export const buildInteractiveAdditionalNodes = (jid, m) => {
406
402
  {
407
403
  tag: 'interactive',
408
404
  attrs: { type: 'native_flow', v: '1' },
409
- content: [
410
- {
411
- tag: 'native_flow',
412
- attrs: { name: 'mixed', v: '9' }
413
- }
414
- ]
405
+ content: [{ tag: 'native_flow', attrs: { name: 'mixed', v: '9' } }]
415
406
  }
416
407
  ]
417
408
  });
409
+ } else if (inner.groupStatusMessageV2) {
410
+ // Group story V2 — butuh hint is_vsn2 supaya render sebagai story di grup
411
+ if (group) {
412
+ nodes.push({ tag: 'meta', attrs: { is_vsn2: '1' } });
413
+ }
418
414
  }
415
+ // DM (bukan grup) butuh bot node tambahan supaya interactive render
419
416
  if (nodes.length > 0 && !group) {
420
- nodes.push({
421
- tag: 'bot',
422
- attrs: { biz_bot: '1' }
423
- });
417
+ nodes.push({ tag: 'bot', attrs: { biz_bot: '1' } });
424
418
  }
425
419
  return nodes;
426
420
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinzsocket/baileys",
3
3
  "type": "module",
4
- "version": "3.2.5",
4
+ "version": "3.2.6",
5
5
  "description": "A WebSockets library for interacting with WhatsApp Web",
6
6
  "keywords": [
7
7
  "whatsapp",
@@ -12,7 +12,7 @@
12
12
  "url": "git@github.com:VinzSocket/Baileys.git"
13
13
  },
14
14
  "license": "MIT",
15
- "author": "Alvin-B2T",
15
+ "author": "VinzSocket",
16
16
  "main": "lib/index.js",
17
17
  "types": "lib/index.d.ts",
18
18
  "files": [
@@ -136,4 +136,4 @@
136
136
  "engines": {
137
137
  "node": ">=20.0.0"
138
138
  }
139
- }
139
+ }