mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
const { toSerialize } = require('./toSerialize')
|
|
/**
|
|
* @deprecate
|
|
* @param answer string
|
|
* @param options {media:string, buttons:[], capture:true default false}
|
|
* @returns
|
|
*/
|
|
const addChild = (flowIn = null) => {
|
|
if (!flowIn?.toJson) {
|
|
throw new Error('DEBE SER UN FLOW CON toJSON()')
|
|
}
|
|
return toSerialize(flowIn.toJson())
|
|
}
|
|
|
|
module.exports = { addChild }
|