Initial Mod v2

This commit is contained in:
2022-12-11 03:41:41 -06:00
parent 4334c13cca
commit ac8c09c665
19 changed files with 1047 additions and 408 deletions

View File

@@ -1,8 +1,9 @@
const {get, reply, getIA} = require('../adapter')
const {saveExternalFile, checkIsUrl} = require('./handle')
const getMessages = async (message) => {
const data = await get(message)
const getMessages = async (message, num) => { //MOD by CHV - Agregamos el parametro "num" para recibir el numero desde "app.js"
// console.log("GETMESSAGES (flow.js)")
const data = await get(message, num) //MOD by CHV - Agregamos "num"
return data
}
@@ -15,8 +16,8 @@ const responseMessages = async (step) => {
return data
}
const bothResponse = async (message, sessionId) => {
const data = await getIA(message, sessionId)
const bothResponse = async (message) => {
const data = await getIA(message)
if(data && data.media){
const file = await saveExternalFile(data.media)
return {...data,...{media:file}}