mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
feat: started multiple whatsapps support
This commit is contained in:
@@ -7,7 +7,7 @@ const { getWbot, init } = require("../libs/wbot");
|
||||
|
||||
const wbotMonitor = dbSession => {
|
||||
const io = getIO();
|
||||
const wbot = getWbot();
|
||||
const wbot = getWbot(dbSession.name);
|
||||
|
||||
try {
|
||||
wbot.on("change_state", async newState => {
|
||||
@@ -58,8 +58,8 @@ const wbotMonitor = dbSession => {
|
||||
|
||||
setTimeout(
|
||||
() =>
|
||||
init()
|
||||
.then(({ dbSession }) => {
|
||||
init(dbSession)
|
||||
.then(() => {
|
||||
wbotMessageListener();
|
||||
wbotMonitor(dbSession);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user