@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.
- package/lib/Utils/messages.js +11 -1
- package/package.json +1 -1
package/lib/Utils/messages.js
CHANGED
|
@@ -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, '
|
|
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