@pontalabs/baileys 1.1.6 → 1.1.7

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.
@@ -959,7 +959,17 @@ export const generateWAMessageContent = async (message, options) => {
959
959
  const buttonsMessage = {
960
960
  buttons: message.buttons.map(button => {
961
961
  const buttonText = button.text || button.buttonText;
962
- if (hasOptionalProperty(button, 'sections')) {
962
+ if (hasOptionalProperty(button, 'nativeFlowInfo')) {
963
+ const nfi = button.nativeFlowInfo;
964
+ return {
965
+ nativeFlowInfo: {
966
+ name: nfi.name,
967
+ paramsJson: typeof nfi.paramsJson === 'string' ? nfi.paramsJson : JSON.stringify(nfi.paramsJson)
968
+ },
969
+ type: ButtonType.NATIVE_FLOW
970
+ };
971
+ }
972
+ else if (hasOptionalProperty(button, 'sections')) {
963
973
  return {
964
974
  nativeFlowInfo: {
965
975
  name: 'single_select',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pontalabs/baileys",
3
3
  "type": "module",
4
- "version": "1.1.6",
4
+ "version": "1.1.7",
5
5
  "description": "PontaLabs Baileys is a lightweight, modern, and customizable WhatsApp Web API library built on Baileys.",
6
6
  "keywords": [
7
7
  "whatsapp",