improvement: better names on wbot methods

This commit is contained in:
canove
2020-09-05 15:43:52 -03:00
parent b8ff993e6f
commit 40e2e5e8a6
8 changed files with 160 additions and 92 deletions

View File

@@ -7,7 +7,7 @@ const cors = require("cors");
const multer = require("multer");
const Sentry = require("@sentry/node");
const wBot = require("./libs/wbot");
const { initWbot } = require("./libs/wbot");
const wbotMessageListener = require("./services/wbotMessageListener");
const wbotMonitor = require("./services/wbotMonitor");
const Whatsapp = require("./models/Whatsapp");
@@ -61,8 +61,7 @@ const startWhatsAppSessions = async () => {
if (whatsapps.length > 0) {
whatsapps.forEach(dbSession => {
wBot
.init(dbSession)
initWbot(dbSession)
.then(() => {
wbotMessageListener(dbSession);
wbotMonitor(dbSession);