mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
improvement: moved all console logs to pino
This commit is contained in:
@@ -37,7 +37,6 @@ export const GetWbotMessage = async (
|
||||
|
||||
return msgFound;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
throw new AppError("ERR_FETCH_WAPP_MSG");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { getIO } from "../libs/socket";
|
||||
import Message from "../models/Message";
|
||||
import Ticket from "../models/Ticket";
|
||||
import { logger } from "../utils/logger";
|
||||
import GetTicketWbot from "./GetTicketWbot";
|
||||
|
||||
const SetTicketMessagesAsRead = async (ticket: Ticket): Promise<void> => {
|
||||
@@ -18,9 +19,8 @@ const SetTicketMessagesAsRead = async (ticket: Ticket): Promise<void> => {
|
||||
const wbot = await GetTicketWbot(ticket);
|
||||
wbot.sendSeen(`${ticket.contact.number}@${ticket.isGroup ? "g" : "c"}.us`);
|
||||
} catch (err) {
|
||||
console.log(
|
||||
"Could not mark messages as read. Maybe whatsapp session disconnected?",
|
||||
err
|
||||
logger.warn(
|
||||
`Could not mark messages as read. Maybe whatsapp session disconnected? Err: ${err}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user