mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-18 19:49:16 +00:00
adapter provider
This commit is contained in:
@@ -17,13 +17,14 @@ class BotClass {
|
||||
|
||||
handleOnMessage = (ctxMessage) => {
|
||||
this.databaseClass.saveLog(ctxMessage)
|
||||
this.continue(ctxMessage.body)
|
||||
this.continue(ctxMessage)
|
||||
}
|
||||
|
||||
continue = (message, ref = false) => {
|
||||
const responde = this.flowClass.find(message, ref)
|
||||
if (responde) {
|
||||
this.providerClass.sendMessage(responde.answer)
|
||||
this.databaseClass.saveLog(responde.answer)
|
||||
this.continue(null, responde.ref)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user